AnsweredAssumed Answered

Simple Script Headache

Question asked by JamesBransom on May 27, 2011
Latest reply on May 31, 2011 by philmodjunk

Title

Simple Script Headache

Post

Hi again, can anyone tell me why the "else if" in this script isn't doing what I expect?  It's called OnObjectEnter and OnObjectExit and is passed the following parameter: People::Name_Last & "¶" & "<<Last Name>>" when a person record is being added or edited.  I'm doing this in combination with conditional formatting in lieu of field labels so the user knows what field is being entered.

Apparently, the "Else if" condition is evaluating to false even when the field is empty (although the field is active and contains the cursor).  I've also tried:  Else if [ LeftValues ( Get ( ScriptParameter ); 1) = ""] and Else if [ not LeftValues ( Get ( ScriptParameter ); 1)].  The latter evaluates to true when People::Name_Last is empty but also when it contains text other than "<<Last Name>>" (which I assume would evaluate to true also if it got a stab at).  What am I missing?

Oh yea, I forgot to mention that the field is auto entered with "<<Last Name>>".

Screen_shot_2011-05-27_at_9.14.25_PM.png

Outcomes