Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have 10 fileds with blank and if all are blank then pass else fail.
I wrote an expression like this in straight table which is not showing any result:
if(if(STR_SUPPL1=' 'and STR_SUPPL2=' 'and STR_SUPPL3=' ' and PO_BOX_LOC='' and PO_BOX_NUM='' and
PO_BOX_REG=''and PO_BOX_CTY='' and ROOMNUMBER='' and FLOOR='','PASS'),'FAIL')
And tried same with isnull().
anybody pls help me.
Thanks
If(
(STR_SUPL1 & STR_SUPPL2 & STR_SUPPL3 & PO_BOX_LOC & PO_BOX_NUM & PO_BOX_REG & PO_BOX_CITY & ROOMNUMBER & FLOOR) = ''
, 'PASS' , 'FAIL'
)
If(
(STR_SUPL1 & STR_SUPPL2 & STR_SUPPL3 & PO_BOX_LOC & PO_BOX_NUM & PO_BOX_REG & PO_BOX_CITY & ROOMNUMBER & FLOOR) = ''
, 'PASS' , 'FAIL'
)
Try with Len(Trim()) may be:
Len(Trim(FieldName)) = 0
Remember that writing an expression in a chart you should (almost always) use an aggregation function. The only exception to the rule is that if you are 100% certain that your dimension will pick one single row for each expression and only one...
Stealing Petter idea and using it with Len(Trim())
If(Len(Trim(STR_SUPL1 & STR_SUPPL2 & STR_SUPPL3 & PO_BOX_LOC & PO_BOX_NUM & PO_BOX_REG & PO_BOX_CITY & ROOMNUMBER & FLOOR)) = 0, 'PASS', 'FAIL')
where did you write the expression? in script or front end? (please specify whenever you use some functions which are common for scripting and UI).
try :
=if( isnull(STR_SUPPL1) and isnull(STR_SUPPL2) and blah blah , 'PASS','FAIL')
why 2 if?
remove one if and remove )
also you have some check with a space ' ' and some check without ''
if(STR_SUPPL1=' 'and STR_SUPPL2=' 'and STR_SUPPL3=' ' and PO_BOX_LOC='' and PO_BOX_NUM='' and
PO_BOX_REG=''and PO_BOX_CTY='' and ROOMNUMBER='' and FLOOR='','PASS','FAIL')
another thing
if your field are nulls or blanks you can use
if(len(trim(field))=0 and ....
Hi
If (Isnull(Field1 and Field2 and Field...) = True(), Fail)
attach the file
petter it worked
Thank u