December 4, 201015 yr I attempted to make a script to fill in a layout of about 25 fields with the current user name and timestamp. I want the script to leave the value in the field if it is already entered. Currently I've written out the script with the following logic "if IsEmpty(fieldName)" "set Field(value)" "ElseIF IsEmpty" which I have looping for the number of fields I have, because the script ends once the IsEmpty returns true. The problem I have is that the script is running very slow. Probably cause of the looping. But I can't quite seem to figure out a more efficient way to script this behavior. Thanks in advance for the advice.
December 6, 201015 yr Do you really want to enter the username and timestamp into 25 different fields all on the same record? That sounds like an odd database design... It seems like these two statements are contradictory, "I want the script to leave the value in the field if it is already entered" and "the script ends once the IsEmpty returns true". You might benefit from a 'Freeze Window' step at the start of your script.
December 6, 201015 yr Author Do you really want to enter the username and timestamp into 25 different fields all on the same record? That sounds like an odd database design... It seems like these two statements are contradictory, "I want the script to leave the value in the field if it is already entered" and "the script ends once the IsEmpty returns true". You might benefit from a 'Freeze Window' step at the start of your script. I figured out a better way to do it. But this is for a layout that is to be used as a checklist for a bunch of tasks. The client wanted a button to fill in all the fields if all the tasks were done by the same person.
December 6, 201015 yr These multiple fields should instead be multiple records in a related table. It will make reporting much easier. For instance, how would you now create a report of all the tasks not yet completed? I call this the "You can't get there from here" problem.
Create an account or sign in to comment