NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: jking on July 16, 2018, 09:39:19 AM
-
I would like the average user to only be able to enter one record in a browse. Based on a previous post of mine, I'm trying to use the loc:found variable. In the End of BrowseTable routine, I embed code to test this variable and set a session variable to be used on the Insert button conditional display field in the templates. For example:
If loc:found = 0
p_web.SSV('DisableInsertButton', 'No')
END
This seems to work within a specific session, but if I close everything and start again, the Insert button shows again. Basically I want the Insert button to appear if there are no records and then be disabled if there is one record entered. Is there a better embed to use? Maybe an alternative solution?
Thanks,
Jeff King
-
Why not to use the Insert Button Condition?
See image
-
I have done something like this.
In a page loaded browse, set the number of rows per page to display to one.
Then use your condition in the insert button condition.
I'm not sure you need to use a session value though since we're still in the scope of the local browse procedure. Seems like my display condition was simpler. I look at it a little bit when I get to my deveplopment machine.
Don
-
Thanks guys. After some experimenting, I have the effect I'm looking for by simply adding the following condition on the Insert button:
loc:rowcount = 0
One anomaly I see is that the Insert button is hidden even if I select "Disable". Not a big deal though.
Thanks,
Jeff