You are viewing limited content. For full access, please sign in.

Question

Question

Compare Values in a Calculation in Forms Ignoring Case

asked on May 2, 2019 Show version history

Hello,

I am hoping that someone can point me in the right direction.  I have a form where I am using one field for manual input (Field A), one field where the value is the output of a stored procedure (Field B), and one field with a calculation to compare them both (Field C), and they are all in a collection.

 

The stored procedure takes the manual input (Field A) and checks the email address against Active Directory and if it is found, fills Field B with the email as it is in Active Directory.

 

The trouble I am running into is that sometimes in AD the email ending is all lower case and sometimes it is all upper case.  So when I try to compare the Field A and Field B, if A is lower case and B is upper case, Field C spits back a value of FALSE.  I need it to return TRUE.

 

I am using Forms Professional Version 10.2.1.246 and the calculation I am using is: 

=AND(INDEX(Field A,ROW())<>"", INDEX(Field B,ROW())<>"", INDEX(Field A,ROW())=INDEX(Field B,ROW()))

 

Basically neither field A or B can be empty and they must equal each other when they have something in them.  Everything works fine if the case matches.  The trouble is when the case does not match.

 

Example 1:

Field A: lastname.firstname@workplace.com

Field B: lastname.firstname@workplace.com

Field C: TRUE

 

Example 2:

Field A: lastname.firstname@workplace.com

Field B: lastname.firstname@WORKPLACE.COM

Field C: FALSE

 

I need example number 2 to read true in field C.

 

Thanks for any hints I can get.

 

0 0

Answer

SELECTED ANSWER
replied on May 2, 2019

Try wrapping both fields in the Lower() or Upper() Forms functions.

3 0
replied on May 2, 2019

Thank you so much.  I must have looked over upper and lower when I was looking through the functions.  Works perfect!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.