NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: kingja on February 21, 2015, 08:46:51 PM

Title: Inline button and row number?
Post by: kingja on February 21, 2015, 08:46:51 PM
Bruce,

     I have a browse listing institutions (Ins:InstID_Key).  There is an inline button at the end that calls another procedure, filtered by the Institution ID.  The called procedure displays the institution name in the sub header.  Please see the attached image.

If I first click a row, then the button at the end of the row, the sub header in the called procedure displays the correct institution.  However, if I open the browse and immediately click on one of the buttons without clicking on a row, it does not get the correct institution.  It seems the button does not actually know what row it is in.  I have the following code in the "user Clicked on a row in the browse embed"

 Ins:Institution_ID = p_web.GSV('Ins:Institution_ID')
 Set(Ins:InstID_key, Ins:InstID_key)
 Access:Institution.Fetch(Ins:InstID_key)
 p_web._LoadRecord(Institution, Ins:InstID_key)
 p_web.FileToSessionQueue(Institution)

 p_web.SSV('IName', Ins:Institution_Name)


This sets a session variable with the name of the institution, so it can be set in the sub header of the called procedure.  I would like to make this work by just clicking on the button at the end of each browse row.  I have tried many other embeds but so far have not found a way.  Can you suggest something?

Thanks,

Jeff

[attachment deleted by admin]
Title: Re: Inline button and row number?
Post by: kevin plummer on February 22, 2015, 07:22:21 PM
Hi Jeff,

your code needs to be on the procedure you called. Also for the button I think there is an option to send the row id which you should tick.

Cheers,

Kevin
Title: Re: Inline button and row number?
Post by: kingja on February 23, 2015, 10:22:02 AM
Kevin,

     Thanks!  That got me going.  I used the Inst_ID session variable from the first browse and loaded the record from the institution file in the Before Sub-Header embed of the called browse.  So simple... it's hard!

Jeff