For our Repeating Events control (below) we decided not to use any value lists since they are kind of a pain to copy from file to file. Instead we’re using simple layout objects with conditional formatting on them so you can paste this layout into your file without issues.
The conditional formatting depends on some initial $$variables we’d normally set in the script we use to call this layout. But we’re also setting those initial conditions with an OnLayoutLoad script trigger. We’re doing this for developers who may go down into layout mode and then “surface” on this layout without having run the script we intended. This way the layout will look right and continue to function even if you get there some way we didn’t intend.
Of course, the OnLayoutLoad version of these initial conditions includes a short circuit on the Continue button since when arrived at outside the normal workflow, this layout doesn’t know which appointment or event it is supposed to operate on. Clicking “continue” in this case shows a message such as “Normally we’d apply the repetition rule you see here to your event, but in this case we’re not sure which event you intended to apply this to. To try this again, click ‘repeat’ beside an event to bring up this layout as part of your workflow.”
We’re trying to build the scripts for two audiences: the user who runs the scripts as part of their workflow, and the developer who may be just screwing around or exploring.