August 19, 201312 yr Newbies I have a field that is populated by a dropdown list - when a user changes the value of that field, I want to display an alert. However, I only want that alert to show if they are changing from ValueA to any other value. Changing from ValueB, etc. should not show the alert. I apologize in advance if this topic has been covered - I've been searching for quite awhile, but couldn't find a solution... Many thanks!
August 19, 201312 yr Solution Simplest way to do it is like this (I think …). Beware that this method works with a drop-down, but not with a pop-up, since you cannot capture the value on field entry. DropAlert_eos.fp7.zip
August 19, 201312 yr Well, this works with pop-up or drop-down and I believe it is simpler. The thing is ... you CAN capture the value of a popup field upon entering field by using script parameter because script parameters are evaluated BEFORE the script trigger fires. So single trigger OnObjectModify does it all with: Set Variable [ $prior; Value:Get ( ScriptParameter ) ] If [ $prior = "Value A" and $prior ≠ DropAlert::theValue ] Show Custom Dialog [ Message: "Changed value"; Buttons: “OK” ] End If Script parameter is simple: Get ( ActiveFieldContents ) Please see attached ... DropAlertMOD.fp7.zip
August 19, 201312 yr Well, you live and learn. I was always under the impression that pop-ups are immune to interrogation, but this a nifty technique indeed.
August 20, 201312 yr I did want to correct where I misspoke ... I said, "...because script parameters are evaluated BEFORE the script trigger fires." This is, of course, technically incorrect because the script has obviously fired but script parameter gets evaluated first. There have been many inconsistent behaviours, particularly between platforms, when using these controls (drop-downs, pop-ups, checkboxes and radio buttons) and there have been bugs in either one platform or the other and it is difficult to keep them straight. AFAIK, this works with Mac and Windows both and for all controls and in both 11 and 12. BTW, MrSmilliamson, I LOVE YOUR CAT PICTURE!!
Create an account or sign in to comment