AnsweredAssumed Answered

Comparing fields for magic key, trim trailing spaces.

Question asked by SteveMartino on Aug 25, 2016
Latest reply on Aug 25, 2016 by coherentkris

Hello forum.

In a script, I am trying to compare two fields to see if they are unique.  If they are unique, it will create a new record via 'magic key'.  If they are not unique, it will show a message, let user try again.

It almost works well.  But I noticed when testing...

 

If [EXERCISES::gType = EXERCISES_save::Type]

 

If there is an existing record "Walk", and I type in "Walk" or "walk" in the EXERCISES::gType field, it works-evaluates as true.

However if type in "Walk  " (trailing spaces) it evaluates as false...expected.

 

I tried trimming trailing space in EXERCISES::gType, with both the Trim and Trim All functions, but it still evaluates as false.  Also I tried 3 custom functions and they also didn't do the trick.

 

Either I'm missing something obvious (probably), or "Walk" and trimming "walk  " will always evaluate in the above script line as false.

 

Any help, pointers, or a bonk on the head are always appreciated.

Thanks

Steve

Outcomes