NetTalk Central

Author Topic: Link on browse field not working as expected.  (Read 3368 times)

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Link on browse field not working as expected.
« on: July 19, 2015, 08:51:33 AM »
Hi Bruce,

I have a table field on a browse which I set to "On click" the URL to call a procedure that uses the field value to filter another browse.

In the Embed "User clicked on a row in the browse" I have this code

  DO OpenFiles
  CLEAR(bat:Record)
  bat:id = p_web.GetValue('bat:id')
  IF NOT Access:etc_batchaudit.Fetch(bat:PRIMARY) THEN
    p_web.SetSessionValue('mybatch',bat:batchrecnum)
  END
  DO CloseFiles

If the user clicks on the link field then the browse fetches the last record that was previously select. If user clicks on the row and then the link field the data is fetched correctly.

Where should the above code be placed to make this work?


Ashley

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Link on browse field not working as expected.
« Reply #1 on: July 19, 2015, 05:49:31 PM »
Hi Ashley,

onclick and server side code won't work together. You would need to more your source into the procedure you are calling via on-click. The other option is to use Javascript after your SS code to open the next window instead of Onclick

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Link on browse field not working as expected.
« Reply #2 on: July 19, 2015, 09:25:03 PM »
Hi Kevin,

Suspected that was the case when it was not working.

Thanks Kevin.

Ashley