Hi Bruce,
I'm having an issue with disabling the Save button on a form, or setting the form to View Only mode. My app is C 11.0.13505 with NT 12.19.
I want to prevent the users from saving the form unless they enter some specific data. I have tried the following methods:
1. Disabled the Save button with the Disable If condition on the Save button tab. This causes the Save and Cancel buttons to be disabled as expected.
In an embed, I then use the following to conditionally re-enable the Save button:
p_web.ntForm(loc:formname, 'enableSave').
The Save button is enabled again but the Cancel button remains disabled.
2. I set the form to View Only mode on the Security Tab with the condition:
p_web.GSV('PatMKD:EDC_STATUS') <> 'On Study'
The form now only has a Close button, and is View Only, as expected. When I use loc:viewonly = FALSE in an embed, the form is now back in insert mode but the Save and Cancel buttons do not return. The Close button remains.
I suspect I need to reset/refresh/redraw the form with some command in my conditional embed code. Any thoughts on were I have gone wrong here?
Thanks,
Jeff King