NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: terryd on September 29, 2013, 12:16:17 AM
-
Clarion8 NT7.25
Hi Bruce
In the CIDC Nettalk seminar I asked how I could hide/unhide these buttons based on a value in the highlighted record
Example
If I do not want to allow a change on a record if the value is (say) REC:status = 2
As I understood it from you on the Form tab of the Browse in the Show Buttons change I would check the include Change Button and put a Condition for it to appear in the Condition field.
Firstly: what should the format be? I have added the REC:Status to the View Fields.
'REC:Status <> 2'
or REC:Status <> 2
or p_web.GSV('REC:Status') <> 2
Secondly, and vitally, when I put a trace in the GenerateUpdateButtonsBelow routine in the Start of "Set jQuery Update Buttonset Options" embed point which is where this condition appears this trace only appears once while a browse is being generated. Selecting different rows do not call this routine again which means (as I understand it) that it cannot be testing the highlighted record to determine if the change button should be included or hidden.
-
welcome back Bruce. Really enjoyed the presentation. Anxiously waiting the downloads so I can review (and improve my coding :)
Bump
-
downloads should be up soonish Terry. It gets changed into download form by playing it through a converter from the stream - so takes at least 2 full days to do. And it's unlikely to be the next 2 days <g>. You can of course access the streams immediately.
condition is clarion code, so
REC:Status <> 2
It appears in GenerateUpdateButtonsAbove, GenerateUpdateButtonsBelow and the value::fieldname routine (if there are inline buttons)
Because the condition is based on the row it doesn't make sense to put a change button below the brows as well - use the in-row change button instead.
-
Thanks Bruce. Yes makes sense. I couldn't see any changes to the button below as I moved from record to record