Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have a multibox there I have used some feilds for selection from those for one filed whenever we clicks on that field the first two values are empty(null values) there i want display some text like Undefined for those Null values.. How can we do this.......
I was tried the below if condition but its not working..............
if(isnull("X_COMNT")=-1, Undefined, X_COMNT) as X_COMNT, but while reloading the script there I get a error like field not found.....
Regards,
Anil.
Hi
Try this
If(Trim([X_COMNT]) = '' OR IsNull(X_COMNT), 'Undefined',X_COMNT) AS X_COMNT
Regards
Ashok
You may need to put the undefined in single quotes as it is a literal string value..
if(isnull("X_COMNT")=-1, 'Undefined', X_COMNT) as X_COMNT
Hi
Try this
If(Trim([X_COMNT]) = '' OR IsNull(X_COMNT), 'Undefined',X_COMNT) AS X_COMNT
Regards
Ashok
Yes chandashok is essentially correct - I did not notice the Isnull(XXX)=-1.
To expand on what he said and take into account the -1
If(Trim([X_COMNT]) = '' OR IsNull(X_COMNT) OR X_COMNT = -1, 'Undefined',X_COMNT) AS X_COMNT
First condition checks if it is a blank or string of spaces, second if it is a null, third if it is equal to -1.
Hi,
I think Null values wont get display in listbox it will be whitespaces try with trim()
=If(trim(X_COMNT)='','Undefined', X_COMNT)
Then no need to use the field name inside the double quotes when using within most of the functions.
Celambarasan
thnx for all replies now its working fine.........
Regards,
Anil