Incorrect data type for operator or @Function:Number Expected

Hi,

I am writing a formula for a column’s value. Below is the code.

@If(Form=“SRDGen”;@If(Working_Status_2=“Pending - Sponsors/Doc Engineer Review” & DEApproval=“”;1;Working_Status_2=“Pending - Sponsors/Doc Engineer Review”&(SSApproval1=“”| SSApproval2=“”| SSApproval3=“”|SSApproval4=“”|SSApproval5=“”|SSApproval6=“”|SSApproval7=“”|SSApproval8= “”|SSApproval9=“” |SSApproval10=“”|SSApproval11=“”);@Text(Sponsors);Working_Status_2=(“Productionized Open - S/W Productionization Review”|“Pending - S/W Requirement Review”)&SoftSenApproval=“”; @Text(Software);0);4)

This code is giving the error as Incorrect data type for operator or @Function:Number Expected. when the view in designer is opened in the client.

Wat can be wrong? This error is not coming for all documents but coming for first two condidtions.

Pls reply…

Thanks in advance.

Subject: Incorrect data type for operator or @Function:Number Expected.

you are mixing return types:

@If(Form=“SRDGen”;

@If(Working_Status_2="Pending - Sponsors/Doc Engineer Review" & DEApproval="";

1; <--- returns number

Working_Status_2="Pending - Sponsors/Doc Engineer Review"&

(SSApproval1=""| SSApproval2=""| SSApproval3=""|SSApproval4=""|SSApproval5=""|

 SSApproval6=""|SSApproval7=""|SSApproval8= ""|SSApproval9="" |SSApproval10=""|

 SSApproval11="");

 @Text(Sponsors);  <--- returns text

 Working_Status_2=("Productionized Open - S/W Productionization Review"|

 "Pending - S/W Requirement Review")&SoftSenApproval="";

 @Text(Software) <--- returns text

;0 ← returns number

);4 <— returns number

)

Make all return types the same either using @text or @TextToNumber

Subject: RE: Incorrect data type for operator or @Function:Number Expected.

I tried to do that…But this can not be done. It is giving the same error and this error is not coming for all the documents…

Subject: RE: Incorrect data type for operator or @Function:Number Expected.

I think one of your OR conditions is incorrect. Try changing this condition:

Working_Status_2=(“Productionized Open - S/W Productionization Review”|“Pending - S/W Requirement Review”)&SoftSenApproval=“”;

to

(Working_Status_2=“Productionized Open - S/W Productionization Review” | Working_Status_2=“Pending - S/W Requirement Review”)&SoftSenApproval=“”;

Hope that helps.

Subject: RE: Incorrect data type for operator or @Function:Number Expected.

Why not use numeric aliases along with @replace to make this much simplier ?Mark

Subject: RE: Incorrect data type for operator or @Function:Number Expected.

Hey…Thanks mann…that worked…a small mistake…took my half a day…

nyways…once again thanks…