There's a script step called Close Popover
Thanks. How do you get a popover to behave as a modal dialog in the first place? At the seminar the presenter indicated there had been a little contention and irritation associated with this issue and perhaps a little forum angst. I do not wish to stir this pot or annoy anyone.
Here is a solution I am trying to work but not much luck ,
Script trigger on popover (Popover 1) setup - On exit execute script "modal"
If [$$Modal = 0]
Go to Object [object Name: "Popover1"]
#my attempt to keep the popover open
A button on Popover1 which calls the script "Close popover"
Set Variable [$$Modal; Value:1]
Set Variable [$$Modal; Value:0].
This feels clumsy ( I think I am weak on understanding how boolean states function in scripts) and also does not seem to work, will 'go to object' open a popover?
I had to think about this for a moment as I didn't see the need for the extra coding, but I gather that it's the "modal" behavior that is the problem since clicking outside of a popover closes the popover--which is not typical of a modal dialog. That hasn't really concerned me too much as closing the popover could be seen as an informal version of closing a modal dialog to cancel.
It's simpler to open a new window that is modal than to get a popover to mimic modal behavior so I guess you have to choose between some extra coding to keep the popover from being closed prematurely or using a window for a modal dialog that has extra "stuff" along the edges of the window that isn't typical of a modal dialog.
I managed to contact to the presenter and asked him to review my script above (it was buggin me not knowing how it worked). He suggested my first script (that makes the popover behave as modal) could be replaced with an On Exit trigger script step.
Exit Script [Result: $$Modal]
This works but I don't quite understand why ( I mentioned I'm Booleanally challenged).
He also mentioned I might need a step in the second script (Close popover)
Commit records ( I'll have to look into this one and see what it does, I thought Filemaker automatically saved records when you exited a field).
Thanks for your help.
FileMaker automatically saves (commits) a record when you click the layout background or change records (not fields).