October 10, 200619 yr 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
October 11, 200619 yr 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
November 1, 200619 yr Author 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, 200619 yr by Guest
Create an account or sign in to comment