NetTalk Central

Author Topic: Cant refresh a child browse  (Read 3845 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Cant refresh a child browse
« on: April 19, 2013, 08:41:28 AM »
Hi,
I have a memory form with a Browse, browse of articles that can be selected to buy. (the right browse in the attached image)
This Browse have a child browse (the left one) wich is FileRelated to the parent.
The parent browse has row buttons to ADD records to the child browse.
 I cant refresh the child button once the record is added.
I´ve tried adding  childbrowse(p_web) to the end of the add routine, even more than once but the refresh is random.
I need to add another record to see the last added.
How can I refresh the child from the Button code AFTER the record is added.
THanks!

[attachment deleted by admin]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Cant refresh a child browse
« Reply #1 on: April 19, 2013, 10:32:33 PM »
are you still using a Form as a child?

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Cant refresh a child browse
« Reply #2 on: April 20, 2013, 03:00:22 AM »
No, but the child browse, the one that is not allways refreshed, has a form as a child, but it works ok.
I´ve deleted the child form to test if it is the problem and even without it the problem persists.

See attached image...
All is in a Memory Form in 3 tabs A, B and C
Entries in A filters the browse 1
Browse 1 is the parent browse, browse 3 is child of 1 and 5 (the form) is child of browse 3.
Presing button 2 on browse 1 adds a record to browse 3.
Browse 3 is supposed to be refreshed every new record is added by button 2
Entering a quantity on entry 4 refresh the totals in form 5. This works OK

Today I realized that all goes better if I first select the record and then press the button.
The code is in the "Server side code when button pressed"

Any code I can add to fetch the selected record when the record hovered but still not selected?

Thanks


[attachment deleted by admin]
« Last Edit: April 20, 2013, 04:35:32 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Cant refresh a child browse
« Reply #3 on: April 20, 2013, 11:05:09 PM »
Hovering does not trigger a request to the server - if it did there would be a LOT of requests arriving at the server and if nothing else, sorting out their order would be difficult. So the user has to click to see the related browses updated.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Cant refresh a child browse
« Reply #4 on: April 21, 2013, 04:14:54 AM »
May be my bad english, sory.

Using the same image of the las post I need to know:

1) Supose the user have selected the first record of browse (1)
    And goes directly to click the button (2) of the second record (this record is not selected)
    In the embed code of button (2) how can I be sure to have fetched the second record before doing anithing?

2) How can I be sure to refresh the browse (3) at the end of the embed code of button (2) ?

Hoping beeing more accurate...
Thanks again


-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Cant refresh a child browse
« Reply #5 on: April 21, 2013, 07:13:57 AM »
1) Make sure the button on browse 2 has "include row id" ticked on. This will mean that the session value of the row id (and only the row id) is set when it gets to the next procedure. Remember just the row id is set in the session queue, if you need the actual record you will need to open the table, and read the record yourself. Possibly also do a FileToSessionQueue call. It all depends on your context.

2) (from memory - not tested)

p_web.SetValue('_parentProc_','parent of browse 3')
p_web.DeleteValue('_eipclm_')
Browse3(p_web)


Cheers
Bruce