The detail you have supplied so far is a bit unclear, but I assume (1) that the field in question is set to auto-enter by calculation; and (2) it is referencing separate table(s) which may even be in a separate file. I further assume that you want to be able to create records by means other than the script you are referring to, and thus require the auto-enter in those circumstances, but also require scripted creation/editing you refer to. Here is one method you could experiment with:
1. Cancel the auto-enter and replace this with a layout script trigger which performs the data entry in the required field.
2. Create another layout which does not have the script trigger and navigate to this layout when you want to run your looping script.
As script triggers are localised to specific field instances or layouts, they will not fire when working on a different field instance or layout.
Of course if my assumption is wrong and when you say "the field I am setting is set to calculate (upon a trigger)", you really mean a script trigger, then all you need to do is 2 above.
Hope that is at least a start.
thanks for your reply.
1) the field in question is set to auto-enter by calculation : correct
2) it is referencing separate table(s) which may even be in a separate file : correct
"I further assume that you want to be able to create records by means other than the script you are referring to, and thus require the auto-enter in those circumstances, but also require scripted creation/editing you refer to"
Unfortunately not 100%, it is about a drag and drop implementation I started off with here:
- Cancelling the auto enter stops the drag to work
- The technique is using a script trigger already
Thanks for the start, unfortunately it wont help.
1 of 1 people found this helpful
What about wrapping the calc in an If() that checks to see if the Created On timestamp field = Modified On timestamp field?
Thanks. That helped - halfway -
The script - starting with 25 seconds running time,
with the field calc turned off was 3 seconds.
With the If Wrapper went down to 11 seconds.
So it's in the middle. I will try to investigate further- if someone wants to pitch in meanwhile... feel free.
Create a layout for the field that does not have the trigger. The script switches to that layout to excute the loop. Then goes back to the orginal layout.
this is not possible.
The field is an autocalc field, it refers to itself so the field can trigger itself once moved (this is the drag and drop technique by excelsys).
fieldname = handle
Funnyicon or simply an upanddownarrow to be used by the user for dragging and dropping
The loop is about something else, it populates the lines that the user can then drag and drop.
While creating the lines, the field should not calculate.
How about setting a boolean variable at the start of the script
Set variable $ScriptRunning to 1
then in the field's auto-enter calculation:
Case ($ScriptRunning = 1, Self, "LongRelatedCalculation")
Ah! By the word Trigger I thought this was trigger rather than auto enter.
Just (as mainsolutions suggested) change the auto enter so as not to fire if on a certain layout, or if a certain varuable is set by the script.
perfect- script execution down to 3 sec. again. Thank you