NetTalk Central

Author Topic: How can i get/save then Unique record ID from a selected row-id in abrowse?  (Read 4233 times)

Bram Klootwijk

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • Email
Hi All,

I want to save the unique record-identifier in a session-variable of a selected row in a browse. I want to use this identifier in another form without using the browse-form option.

(It's for a selection of a row in a browse and then i go to another form with a button/hyperlink. Then i need that session-variable to get the selected record)

Any Help?

Greetings,
Bram

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Hi Bram,

Make a form, let's call it "Form A". Memory form, no Save or Cancel button,  Formstyle set to none.

It has 1 field, the browse.

then for the form field (the browse) - client side tab, Send new value to server - and so on.

Cheers
Bruce

Bram Klootwijk

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • Email
Hi Bruce,


i have a browse without any buttons on the rows. WHen i add a stop() message to the embed-point in the send new- value, the value returned is always the same. I changed the web21.app to test your suggestion with the BrowseCustomers in a form, but no luck. If i hit the "change" button in the row of the browse, then i get the correct customer-id. But when you do'nt have in-line browse-buttons, it does'nt seem to work.

Any idea?

Greetings,
Bram

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How can i get/save then Unique record ID from a selected row-id in abrowse?
« Reply #3 on: September 23, 2009, 06:42:07 AM »
It's worth updating this thread with some explicit detail that may not have been around when the thread was started.

I'll be using example 25 for purposes of this discussion.

Example 25 does two things. Firstly it has a parent-child browse relationship on the window, and secondly as the parent record is selected, the child record is updated.

Now most of this work is happening automatically. NetTalk assumes that when a parent row is clicked then the child needs to be updated. In the example 25, the new Invoice ID value is passed to the child as a Value. However remember to use the SessionValue in the child filter (with a StoreValue if necessary.)

If the child is a NetWebSource, and the "Generate Ajax Div" option for the source is turned on, then the source also behaves like a child browse. ie it is refreshed for each click on the parent browse row.

Some for some other news;
If you watch the server log carefully you'll see that when a browse row is clicked there are actually 2 requests sent to the server.
the first looks like this;

GET /browseinvoices?&_ParentProc=&_Clicked=1&id=INV:ID&Value=2

and the second looks like this;

GET /browselineitems_browseinvoices?refresh=INV:ID&INV__ID=2&

the first call is the browser telling the server about the "click". This updates the session value on the server for the Inv:Id field.

The second call is the refresh request for the child.

Cheers
Bruce