NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: billbarker on March 20, 2015, 05:53:13 AM
-
Normally I use the Browse/Form paradigm, but in certain conditions I know the exact record I wish to update... In 'normal' clarion I would just 'get' the record, then call the update form as 'change'... is there a similar method here?
Thanks
Bill
-
Hi Bill,
See: How do I call a form directly using a link? Not via a Browse.
http://www.capesoft.com/docs/NetTalk8/NetTalkWebFAQ.htm#W4
Regards
Johan de Klerk
-
Hallo Bill,
Check this "Default Form Action" on manual. Maybe will help you.
http://www.capesoft.com/docs/NetTalk8/NetTalkWebFunctionality.htm#FormAdvancedTab
or
http://www.capesoft.com/docs/NetTalk8/NetTalkWebFAQ.htm#W4
A very good set of Q&A you will find here:
http://www.capesoft.com/docs/NetTalk8/NetTalkWebFAQ.htm
Robert
-
Ok, but I have one small issue, I don't seem to be able to pass across a value for the key....
My table is pretty simple, with a unique URN as the primary key, so in the menu parameter for the update form I've tried......
'change_btn=change&_bidv_=' & p_web.AddBrowseValue('pageheadertag','Club',clu:byURN,5) ##### This WORKS PERFECTLY!!!!!!!!
'change_btn=change&_bidv_=' & p_web.AddBrowseValue('pageheadertag','Club',clu:byURN,p_web.GSV('ClubURN')) ###### this returns 'record not found'
I try setting a local in the embed before the menu is called with ClubURN = p_web.GSV('ClubURN')
then
'change_btn=change&_bidv_=' & p_web.AddBrowseValue('pageheadertag','Club',clu:byURN,ClubURN) ###### this also returns 'record not found'
(at that point the session value is set to 5)
Have I missed something?
Thanks
Bill
-
Hi Bill,
remember that the menu parameters are set when the menu is _generated_ not when it is _clicked on_. By the time the user clicks on it (in the browser) it has been in the browser for some time - since it was generated. Changing the SessionValue in the time won't affect the menu.
Since you are priming it from a session value, it might simply be easier to prime it when the form opens. ie don't pass the parameter to the form at all, but on the PRIMING tab for the form prime the value - "Prime for loading" is the option you want to use.
Cheers
Bruce
-
Bruce,
Yup, still not 100% in the mindset of most things 'already happened'!
Maybe I misunderstood something, but I don't want to 'prime' certain values in a form, I want to update an existing entry, I just want to 'land' on the form with it populated with the current data, and perform an UPDATE.
Do I just 'get' the record (and all lookups) in the 'PreUpdate' embed, and then tell the form (somehow) that it is in an 'update'?
-
>> Do I just 'get' the record (and all lookups) in the 'PreUpdate' embed, and then tell the form (somehow) that it is in an 'update'?
you're making it harder than I've made it for you.... Remember NetTalk templates do things that ABC doesn't <g>...
>> Maybe I misunderstood something, but I don't want to 'prime' certain values in a form,
I understand - if you did I'd tell you to "Prime on Insert / Update / Copy" etc...
No, this is "Prime FOR Load" which is slightly different.
Stuff you prime here is set _before_ the "record for editing" is loaded. ie this is your opportunity to prime the fields before the GET which loads the file record.
Usually of course this is not used, because the browse does that work (and passes the ID as a parameter) but in this case, no browse means it's not passed - which means it has to "prime the field for loading" from somewhere else...
>> Do I just 'get' the record (and all lookups) in the 'PreUpdate' embed,
That's what "Prime For Load" does for you....
>> and then tell the form (somehow) that it is in an 'update'?
That's done either as a parameter (which you can still pass via the URL) or on the Advanced tab of the form properties - you can set the default action.
cheers
Bruce
I want to update an existing entry, I just want to 'land' on the form with it populated with the current data, and perform an UPDATE.
-
Bruce,
Sometimes a simple 'thank you' for this amazing support does not seem enough, but... once again.. thank you (and thanks for your [seemingly!] infinite patience)
Bill