NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: springguy on March 25, 2012, 01:43:02 PM
-
NT 5.47
Clarion 6.3
Static Pages with Dynamic (NetTalk) content
I have a need to call a form (that is always inserting in a table) and upon saving, it calls another form (that is always inserting in a different table).
The html page has <!-- Net:UpdateHousehold --> and the UpdateHousehold webform has the Advanced Tab setting for Insert. That form appears correctly and on Saving, it inserts a record in the Household file. That webform calls another html page on saving.
The page it calls has <!-- Net:UpdateMember --> and the UpdateMember webform has the Advanced Tab setting for Insert. The form appears, but it is not in Insert mode, and the PreInsert routine is not called, and upon clicking the Save button, the record is not inserted into the member file.
Upon saving, the UpdateMember calls another html page correctly.
It appears that the problem is that I am not in insert mode on the second form, and I have verified in the SetAction routine that I am entering with no action setting (p_web.GSV(UpdateMember_CurrentAction) contains no value.
How can I have the second form operate in insert mode and save the record?
Thanks,
Mike Springer
-
if the second form is only called in Insert mode, then you can set this on the Advanced tab of that form.
-
Bruce,
That's what I thought, too. But, I have the Insert Mode checked ON in the second form, but I don't find that the PreInsert embed is ever called and the data that is entered in the form does not result in a record being inserted.
The first form behaves correctly (insert checked ON on the Advanced tab, PreInsert embed is called, and the record is inserted). But the second form does not go into insert mode (apparently).
Is there an embed and session value that I should look at that would give a clue as to what is happening?
Mike Springer
-
can you maybe build a small example of the problem Mike - preferably not your actual app - just tweak one of the shipping examples to show the effect.
cheers
Bruce
-
Hi Mike,
thanks for the example.
As you are using NetTlak 5, it's probably best if you make the following change to the netweb.clw file yourself. I'm not sure when the next NT5 build will be.
netweb.clw
NetWebServerWorker.SaveForm method
add the following line, at the end of the method, immediately before the
return ans
line
self.SetValue('_form:inited_',0)
I've made the same change in NT6 - that'll be in the 6.27 build.
cheers
Bruce
-
Bruce,
You are 'da man! That works perfectly!
When I get a chance after this deadline I'm on, I'll upload to the latest version of NT6. In the meantime, you made my customer (and me) happy!
Thanks,
Mike