December 10, 201312 yr Basically I'm experimenting with different display strategies and I like the idea of using merge variables as buttons. My objective is to create a static number of merge variables, named $$mergeVar1-$$mergeVar10; then based on some trigger, declare these variables dynamically by way of a loop; then create some kind of button toggle/command functionality based on the name and content of the variable I press. I like the idea of using merge variables because the toggle command "list" could expand or shrink based on the scenario I prescribe. This is basically in alternative to using multiple sets of radio buttons, in which some of the radio fields might be irrelevant/taking up space given the context. The other downside to the radio field implementation (I think) is that I don't think I can use OnObjectEnter script triggers which I'd like to do. I've seen custom functions that grab all of the merge variables names/content on the layout, but I want to grab just the one I select. Is this possible in FMP 12?
December 10, 201312 yr Please don't double-post. I've merged your two topics. Let me know if you want it moved to a different topic area.
December 10, 201312 yr Author Workaround aside, I want to capture the field contents of a radio button before that field is modified.
December 11, 201312 yr Workaround aside, I want to capture the field contents of a radio button before that field is modified. Use an OnObjectEnter trigger and set Get ( ActiveFieldContents ) as script parameter (courtesy of LaRetta)
December 11, 201312 yr OnObjectEnter script will not fire upon field entry for radio button, checkbox and pop-up menu but the script's script parameter will be captured. The same is true for OnObjectModify. Even though OnObjectModify says it will fire after the field is modified, its script parameter is captured beforehand. One would think that script parameter would be part of the 'script running' so would not take place until after but that is not the case. I have not had a chance to test 13 yet on these behaviors; I assume they are the same. So, on these controls ( radio button, checkbox and pop-up menu ), you cannot stop field modification but you can use Revert Record Request (best approach since it doesn't change the modification timestamp) or use your script to reset the value after it has been modified. If you have multiple buttons you wish to name similar; if you have multiple fields with similar then it indicates that you might be heading down wrong structural path. Do you have several fields which are alike, i.e. numbered? Or are the field names questions? It is helpful if we understand the purpose and context when presenting a question otherwise we can only provide broad, high-level support. :-)
Create an account or sign in to comment