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

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

Recommended Posts

Posted

Hi everyone. Strange behavior happening with my script that I can't determine the source of:

I have a dropdown list on my Loans layout that triggers a script. The dropdown TEXT field is set to a simple Yes or No, and when changed, triggers this script.

At the beginning of my script, I pass the value of the dropdown field to a variable "$returned". It correctly receives the selected value. And the value correctly matches that of the field Loan Sale::Returned.

However, when I go to test the variable, or even the original field-- If($returned="Yes") or by testing If(Loan Sale::Returned = "Yes) --it does not validate. I even use a Show Custom Dialog box with the values of both $returned and Loan Sale::Returned, and both appear as "Yes". The field is definitely set to Text, and I even tried GetAsText($returned) to see if that would = "Yes" but it doesn't pass the test.

I tried passing a Commit Records step at the beginning of the script in case there was a cached value, but this didn't solve anything either.

The screenshots show the valuue being "Yes", and then I proceeded to Step-Into the statement and you can see it skips over without returning true.

Thanks for the help,
Ryan 

Screen Shot 2017-04-05 at 2.51.40 PM.png

Screen Shot 2017-04-05 at 2.51.57 PM.png

Posted

Are you referring to correct TO in the "Else if"? Check the TO of the layout which the script is running at the time.

Posted
12 hours ago, Wim Decorte said:

spaces or trailing returns in the value?

oh my god....yes. I hadn't considered that, but there was a trailing white-space character after the Yes value.

thanks for pointing out the obvious!

Posted

Yet another example of why it is useful to have fields set up to use the auto-enter calc: trim( textFormatRemove( self ))

This topic is 2786 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.