mr_vodka Posted May 23, 2012 Posted May 23, 2012 Here is a demo of conditional value lists using FMP12 and ExecuteSQL. In the demo there is one sample of using straight text and another using IDs instead of the text. There are no relationships between the user interface and the tables of values. ConditionalVL_SQL.zip 1
Newbies russbrad Posted June 11, 2012 Newbies Posted June 11, 2012 very helpful. thanks! Just what I've been thinking of doing. Quick question... what if (to use your example) you have a President without a State? How would you make this work if your data included intentional blanks?
mr_vodka Posted June 11, 2012 Author Posted June 11, 2012 I would include a <no state> option possibly, but perhaps I would also question the structure in that case.
giles12345 Posted July 29, 2012 Posted July 29, 2012 Thank You - A great example One thing though ... how is <<$display1>> etc assigned?
shin Posted July 29, 2012 Posted July 29, 2012 Once you move that merge variable, you can see its answer is by trigger.
giles12345 Posted July 29, 2012 Posted July 29, 2012 I'm sorry that's a bit too vague for me. - so your saying it's a merge variable ... great - I've moved it to reveal the combination of merge variable and underlying "T1", "T2" etc field - but there is nothing that I can see that assigns these variables with a value
LaRetta Posted July 29, 2012 Posted July 29, 2012 there is nothing that I can see that assigns these variables with a value On the top of the layout ID_Example, the text box 'Set display variables' holds a Let() statement within the conditional format. This is where those merge variables are set. No script needed. :^)
giles12345 Posted July 30, 2012 Posted July 30, 2012 OK I'm missing one final bit. Something is causing the layout to update when I release the dropdown. I physically have to click somewhere on the layout to force the same effect. I have looked in scripts, field set, and layout but can't see whats causing this
LaRetta Posted July 30, 2012 Posted July 30, 2012 We'll probably need to see your file or maybe John can spot it but, do you have script trigger Exit Script attached OnObjectEnter?
mr_vodka Posted July 30, 2012 Author Posted July 30, 2012 Make sure you have the freeze window script on for the onObjectModify
fabriceN Posted August 12, 2012 Posted August 12, 2012 To me, this is the most valueable thing I learned at DevCon. Thank you Mr. Vodka!
bcooney Posted April 29, 2014 Posted April 29, 2014 Hi John, Did 13.0v3 break this? It did rely on an unsupported feature...my $$vars are all populated, but cannot get the drop down list to populate. -Barbara
Lee Smith Posted April 29, 2014 Posted April 29, 2014 (edited) His example file is working for me. btw, John hasn’t been here since January Edited April 29, 2014 by Lee Smith btw added
bcooney Posted April 29, 2014 Posted April 29, 2014 Thanks, Lee. Maybe I'll PM him. His file works when opened in FM13 for me too, but my implementation does't. Perhaps I'm missing a checkbox somewhere. However, I might change over to a virtual list, as I do not like to incorporate unsupported "features."
bcooney Posted April 29, 2014 Posted April 29, 2014 and..the stupid thing I missed - creating records in the utility table! All good now. Great technique, it allows me to have a portal of item and value, where each portal row's value field can have a different set of choices in its value list, depending on the item_id. Very cool!
Recommended Posts