I added a file with a popup.
You can use the add address button to see the popup.
I would use a search field on top of the popup to filter the list.
If this is something you want let me know if you need some help with the search field.
Great! Thanks for the help.
I had actually given it some more thought and I figured I could use a Global field in a "resources" table to store the primary key for the selected phrase. Then, in the script, return to the initial form, set the view to the appropriate tab, and insert the text associated with the selected phrase into the text field.
I can see what you're doing and that is similar.
add a button to open a popover, rather than a separate window.
Put a portal in the popover, with related phrases
a phrase portal row button/script to capture the phrase to a $_variable, and
- either INSERT CALCULATED RESULT the variable value into the target field; if you capture the insertion point before opening the popover
- or as per the demo, first have the open popover script insert a placeholder string (###), then select and Substitute the phrase for the string
Leaving the layout to go to a go to a phrase layout will have an implicit commit, losing the insertion point
demo_insert.fmp12.zip 69.1 K
Thanks for the reply. I like this solution as well. The only issue I might have is that there could be 100's of phrases to pick from so it might be preferable to allow the user to drill-down search on a keyword or pick from a category.
<<The only issue I might have is that there could be 100's of phrases to pick from so it might be preferable to allow the user to drill-down search on a keyword or pick from a category.>>
then either create a search function for the phrases, or create a 2 or 3 level hierarchy classification
For a search; create a aec_phrase_keywords field in the Phrase table
aec_phrase_keywords = Substitute ( phrase, " " ; < pilcrow> ) & <pilcrow> & phrase
<pilcrow> is the carriage return character
a REL for the search
and a search global, script trigger on the search field to refresh the result on keystroke...
Classification hierarchy is a bit more involved
Okay, putting this into action but I can't see where you named "ptl_phrase" that you reference in the "Go to Object" call in the script. In the inspector the popover button does not have a name.
I'm sure I'm missing something but if you point me in the right direction I'd appreciate it.
"ptl_phrase" is the object name of the portal in the popover
- Inspector, whatever the first tab is called theses days, Position, Name
having the script go to object contained within the pov, forces the popover open
object naming btw is a best practice. It also really helps when debugging, using fmXRaySpecs, using BaseElements for locating error objects...
The popover button ( call it btn_pov for example) itself is not the target
try making it the target of a simple button; it will only become selected, but the pov itself will not open
the target is the portal, within the popover, being raised from the popover button:
btn_pov_phrase ( or pop_btn_phrase)
(we all have our own naming conventions lexicon)
If you get to having a global search field (fld_search) on the popover, then make that the go to object target. that way the cursor is entered into the search field automatically; one less user action
The other aspect that there is a ordinary script button calling the popover opening, rather than the popover button being labelled with 'insert' and that being the user click point.
This is not always necessary, but it does add flexibility:
- to place the popover somewhere other than the calling button
- maybe hide the popover button altogether
- maybe have layout several buttons call the same popover containing several slide control panels, and conditionally going to a specific SCP on the POV
- or call a popover from a portal row button
Okay, lots of good information here.
Yes, "ptl" is your prefix for Portal. That makes sense and I was able to find that.
It's working very well in my app now. I placed the launch button over the popover button so the user will not see the popover button and try to tap it. I also added a button the popover to allow the user to cancel out and then it also clears out the insertion point text.
I haven't done anything with the search yet, but that shouldn't be too difficult.
Thanks for all of your help. Very happy with the results so far!
you can also add hide object behaviour to the popover button:
Inspector, 4th (data) tab, behaviour, hide object when: 1
i.e just enter the number 1, which is always true
That way the pov_btn is always readily visible in layout mode
Thanks for the tip. Works great!