bob0sama Posted December 4, 2010 Posted December 4, 2010 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.
Matthew F Posted December 6, 2010 Posted December 6, 2010 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.
bob0sama Posted December 6, 2010 Author Posted December 6, 2010 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.
Vaughan Posted December 6, 2010 Posted December 6, 2010 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.
Recommended Posts
This topic is 5101 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