kiwiora Posted October 10, 2006 Posted October 10, 2006 Not quite sure where this falls under so hopefully this forum is appropriate as it is part of a script. How can I dynamically check the status of a field? i.e I have one script which runs, and I need it to check if(isempty(#field#) where #field# is whatever field they click on? get(activelayoutobjectname) doesn't appear to work as it's not "active" if it's just clicked on :-S TIA
John Mark Osborne Posted October 11, 2006 Posted October 11, 2006 If [isEmpty(Evaluate(Get(ActiveFieldName)))] Show Custom Dialog [Quote(Get(ActiveFieldName)) & " is empty!"; Quote(Get(ActiveFieldName)) & " is empty!"] Else Show Custom Dialog [Quote(Get(ActiveFieldName)) & " is not empty!"; Quote(Get(ActiveFieldName)) & " is not empty!"] End If
kiwiora Posted November 1, 2006 Author Posted November 1, 2006 (edited) Thanks but that's not quite right? You are referencing an "active" field. But the field is not active. They are merely clicking on a "toggle" button that overlays the field. i.e I have a load of checkboxes. Lets say 1 - 50 each one is called Date{number}_na I want one script that when clicking on the checkbox, it checks the status, then runs the script accordingly. (I also want it to go to a dynamic related set of records but that's a whole nother story!) I could do 50 if statements, but I want one that deals with the whole lot. So whilst in theory yours is right, merely clicking on the button doesn't "activate" the field. I thought adding into the front something like go to object[objectname:"Date"&Get(scriptparameter)&"_na"] if[isempty(evaluate(get(activelayoutobjectname))] set field "1" else set field "" End If but apparently not... (i don't think dynamic object names work like I've done). Have also tried setting a variable with the concatenated object name (i.e set $$object "Date"&get(scriptparameter)&"_na") but that doesn't work either -S I hope that makes sense. TIA Edited November 1, 2006 by Guest
Recommended Posts
This topic is 6599 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now