Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4113 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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!

Posted

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

  • Like 1
Posted

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

Posted

Well, you live and learn. I was always under the impression that pop-ups are immune to interrogation, but this a nifty technique indeed.

Posted

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!!    :yep:

This topic is 4113 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.