NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: ntnewbies on November 08, 2018, 12:10:36 AM

Title: calling a form from a button in a browse
Post by: ntnewbies 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.
Title: Re: calling a form from a button in a browse
Post by: Vinnie 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.
Title: Re: calling a form from a button in a browse
Post by: ntnewbies 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?
Title: Re: calling a form from a button in a browse
Post by: DonRidley 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 (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 (http://www.capesoft.com/docs/NetTalk11/NetTalkWebFunctionality.htm#BrowseGeneralTab)
Title: Re: calling a form from a button in a browse
Post by: Bruce 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
Title: Re: calling a form from a button in a browse
Post by: ntnewbies on November 13, 2018, 09:24:00 PM
thanks Don and Bruce,
will look into your suggestion.
thanks again.