Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Empty set comparison problem 1

Status
Not open for further replies.

cojiro

MIS
Mar 20, 2003
62
US
Can someone tell me why this formula doesn't work and what I may need to do to fix it? It never recognizes when the string variable SectionCode is empty, i.e. it never returns "None Entered" even though it should for many records.


if {EmpRequest.SectionCode}<> &quot;&quot; then {EmpRequest.SectionCode} else &quot;None Entered&quot;

Thanks,
Andrew Wierzbic
 
Are you sure the field does not have spaces in it? There is a difference between &quot;&quot; and &quot; &quot;.

Test for nulls first, then for a field full of spaces as follows:

if IsNull({EmpRequest.SectionCode}) or if length(trim({EmpRequest.SectionCode}))then &quot;None Entered&quot; else {EmpRequest.SectionCode}

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
Thanks, the IsNull() function is what I needed. For some reason its not listed as an available function in the formula editor.
Again, I appreciate the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top