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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COMPUTATION Error, IF Then Statement using And Operator 1

Status
Not open for further replies.

patelr26

Programmer
Nov 18, 2008
2
0
0
CA
Dear All,

I'm currently using business objects 5.1.6
I'm writing an If statement using And operator to get the result but i am getting an "COMPUTATION" error. Please refer the syntax below:

=If(<ROLE>="HR" And <ROLE>="PAYROLL") In (<Sales Order #(Details)>)Then "HR/PAYROLL"

Any help would be much appreciated
 
The 'IN' operator expects a fixed list of values. You use in combination with a variable. Does not work that way..

Ties Blom

 
I re-wrote the formula as advised but still getting the same error. Could you please help again

=If(<ROLE>="HR") In (<Sales Order #(Details)>) And (<ROLE>="PAYROLL") In (<Sales Order #(Details)>) Then "HR/PAYROLL"

Thanks
 
Apart from the wrong syntax , how can <ROLE> be both "HR" AND "PAYROLL" for a given record?

I am not sure where you are after..

The IN operator expects values like:

=If ........ IN (1,2,3,4,5) Then ..............

Ties Blom

 
I don't think the In clause is needed at all.

If role=HR OR role=payroll then hr\payroll

Remember these statements act on a single row.

Steve Krandel
Intuit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top