Hi @MonkeybreadSoftware ,
Hoping to see whether this is even doable with the plugin. I have far more success with feature requests for the product from you than Claris !
So, here's the thing. When writing scripts, so often you'll be working in it, and bringin up dialogs that have a table occurrence selection box. Examples would be set field, GTRR, replace field contents, and so on.
The starting table occurrence for these dialogs, is always the current layout you're on. FileMaker assumes you are writing the script for the context you're current layout is on.
This is almost never the case
The problem is unless you switch the layout, you always have to keep selecting the correct TO from these dialogs. It winds me up to no end.
Further to that, often when writing a script, the script itself is switching context throughout, meaning different parts of the script are working from different contexts anyway.
With all that said, I'm wondering if it is possible from a technical standpoint that when a dialog opens (e.g. Set Field), whether you can programmatically set the table occurrence that is chosen in this dialog ?
IF that is possible, it opens up a couple of really awesome options:
- A box at the top of the script where you can nominate a "starting" TO. So when writing a script, you set this once, and then all future dialogs you go into in the script default to this TO. It could sit beside the MBS search perhaps, and it could just default to current layouts context for lack of a better option.
Or alternatively / in conjunction with...
- Each time you go into a script step, could it look up the script at previous steps to try and establish what the context would that the user might be on at that point in the script? I realise this is actually far more complex and in a lot of circumstances not possible to know until run time.
Just thinking out loud really about personal bug-bears I have when developing.This is always an annoying one.
Or
- Perhaps it just always remembers the last chosen TO from the previous dialog. So next time you go back in, it just selects the last chosen.