NetTalk Central

Author Topic: calling a form from a button in a browse  (Read 3407 times)

ntnewbies

  • Full Member
  • ***
  • Posts: 168
    • View Profile
    • Email
calling a form from a button in a browse
« on: November 08, 2018, 12:10:36 AM »
hi friends,
i have a browse (the file is Invoice). In that browse, i create other button and on click i call the UpdateCustomer file.

If i click that button, it does call the UpdateCustomer but it says Record not found.

Obviously because i did not send the Customer ID to the form.

What i did is i put the customerid in a session value using the send the code to server and put it as p_web.SSV('CustomerID',INV:CustomerID)

What should i do in the form so that it actually retrieve this customer id record from the Customer file?


thanks.

Vinnie

  • Full Member
  • ***
  • Posts: 175
    • View Profile
    • Email
Re: calling a form from a button in a browse
« Reply #1 on: November 08, 2018, 12:56:46 AM »
Create 'Other' button in the browse

On Tick Tab
Set Procedure Name :    UpdateCustomer
Set Parameters         :    '_bidv_='&p_web.AddBrowseValue('BrowseInvoice','Customer',CUS:KeyCustomer,INV:CustomerCode)

Set Row ID Filed
Set Include Action
Set Action - Change

'BrowseInvoice' is the name of your Invoice Browse calling from
'Customer' is database to access
CUS:KeyCustomer is the key you are using
INV:CustomerCode is customer code in invoice file you clicked on

Hope this helps.

ntnewbies

  • Full Member
  • ***
  • Posts: 168
    • View Profile
    • Email
Re: calling a form from a button in a browse
« Reply #2 on: November 08, 2018, 01:08:42 AM »
Hi  Vinnie,
Thank you for the reply. I have tried it but it still gives me error no5 record not found.

should i do anything at the form?

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: calling a form from a button in a browse
« Reply #3 on: November 08, 2018, 03:31:05 AM »
Make sure the parameter Vinnie mentioned is being passed.  You should be able to see it in your NT webserver's log.  If the ID field is a STRING, make sure it's clipped.

This is a good read about passing parameters:
http://www.capesoft.com/docs/NetTalk11/NetTalkWebBasic.htm#Prameters

Scroll down to Properties Tab (Other Button):
http://www.capesoft.com/docs/NetTalk11/NetTalkWebFunctionality.htm#BrowseGeneralTab
« Last Edit: November 08, 2018, 03:40:09 AM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: calling a form from a button in a browse
« Reply #4 on: November 12, 2018, 12:39:00 AM »
>> Thank you for the reply. I have tried it but it still gives me error no5 record not found.

make sure the browse and form are using the same unique key.

also this step;

>> Set Parameters :    '_bidv_='&p_web.AddBrowseValue('BrowseInvoice','Customer',CUS:KeyCustomer,INV:CustomerCode)

is not necessary, and the parameters field should be cleared.

cheers
Bruce

ntnewbies

  • Full Member
  • ***
  • Posts: 168
    • View Profile
    • Email
Re: calling a form from a button in a browse
« Reply #5 on: November 13, 2018, 09:24:00 PM »
thanks Don and Bruce,
will look into your suggestion.
thanks again.