I confirmed your problem. I created a Popover that displayed a portal. When I created an "OnObjectEnter" script trigger that sorted the records in the portal, the Popover displayed briefly then disappeared when the script trigger activated. I don't know if this will work for you, but I put a sort on the portal and not as a script trigger, it displayed properly. Would it be possible for you to sort your TO used to create your diagram and avoid using script triggers?
I currently use the workaround of a button above the popover button for sorting and showing an object in the popover - which displays the popover. But I doubt that it is meant like that.
My understanding is that popovers always close when you change records. Therefore, you need to do your record shuffling prior to opening a popover. (or close and re-open)
My understanding is that popovers always close when you change records.
Obviously. But is that documented anywhere? Is that "expected" behaviour in the eyes of the user? (When I stumbled across this, I first thought of everything as the reason, but not the little sorting) Why doesn´t FileMaker itself first check if the background is to be updated and then show the popover instead of just shortly blinking ?
So I think it´s a bug and I reported it to FM Inc.
I actually agree with you that having to reopen a popover each time you go to a new record can be disruptive from the user's pov. (Assuming that a whole lot of extra scripting hasn't been added to try and 'guess' whether the user wants the popover open or not.)
Thus, I have submitted a feature request to this effect. (You might like to, as well!)
For example, I have a layout with a tab control and on one of the panels, there's a portal. Currently, it's very useful for the user to be able to drill down to that tab with the portal and then click through a found set of records, eyeballing 'useful detail'. Having to reopen a popover each time would be relatively disruptive.
I would like to switch the whole layout to a more popover-oriented approach (for general design consistency) but the current popover behaviour diminishes the user's experience in this context. Thus, I have to choose between the various layout options and/ or, add in coding complexity. (Maybe that sense of 'coding complexity' is illusory and it's just a new habit to learn. :-) )
That said, I would prefer that the popover did not automatically close when switching between records.
Do others prefer that the popover automatically closes? It might be an interesting straw poll, with fresh perspectives.
All the best,
You need to take care of 1 thing that as you are running the trigger script your script trigger should not have navigation step like "Goto Object", "Goto record", "Goto Layout" etc. Secondly as per Filemaker concern you cannot open a Popover from a Popover which you are doing on your script unknowingly. And unfortunately you are trying to open the same Popover object by your script trigger due to which its going into an infinite loop.
- 2nd I advice you to do the sort before you open the Popover content or you can just use refresh object and provide the name of Popover object to refresh so you can able to see the Popover contents in sorted form.
If you need further help you can describe what exactly you are looking for your functionality so we are free to help you.
Software Developer, Mindfire Solutions, India
FileMaker11 & 12 Certified Developer
thanks for all the good minded help.
I already have a workaround with a second button for sorting and then opening the popover via goto object - but that is a work around.
Sorting in my eyes shouldn´t close a popover - it is unexpected behaviour. And you can´t show the most diagrams without sorting the data before.