AnsweredAssumed Answered

Script to Check for Empty Fields

Question asked by sydbarker on Dec 8, 2015
Latest reply on Aug 16, 2017 by afwalton

I am trying to create a script that essentially will check the entire record for empty fields, instead of having it validate each field individually. The script I have written is;

 

If[IsEmpty(Personnel::ContactName  xor  IsEmpty(Personnel::Company) xor  IsEmpty(Personnel::Address) xor IsEmpty(Personnel::Title) xor IsEmpty(Personnel::Relationship) xor IsEmpty(Personnel::CompPhone) xor IsEmpty(Personnel::CellPhone) xor IsEmpty(Company::Market) xor IsEmpty(Company::RelationshipEst) xor IsEmpty(Personnel::Work6Mo) xor IsEmpty(Personnel::PriorityGrade) xor IsEmpty(Personnel::Relationship) xor IsEmpty(Personnel::Contract) xor IsEmpty(Personnel::DecisionMaker))

Show Custom Dialog["Empty Fields"; "You have one or more empty fields on the current record. Please return and complete the record entirely."]

     If[Get(LastMessageChoice] = 1]

          Go to Previous Field

     End If

End If

 

I have the script trigger set to OnLayoutExit, but when exiting the layout, the script shows nothing. Any tips?

Outcomes