I'm trying to set a calculated value based off two number fields which can be between 1-5.

Now depending on this combination the fields the result will differ. e.g. 1&1=1, 1&2=2, 2&1=3, etc.

I've tried a number of ways to make this function but have failed:

*or(*

* If(and(CurrentFinancialL == 1, CurrentFinancialC == 1), 1),*

* or(*

* If(and(CurrentFinancialL == 2, CurrentFinancialC == 1), 2),*

* or(*

* If(and(CurrentFinancialL == 1, CurrentFinancialC == 2), 3),*

* or (*

* If(and(CurrentFinancialL == 3, CurrentFinancialC == 1), 4),*

* If(and(CurrentFinancialL == 2, CurrentFinancialC == 2), 5)*

* )*

* )*

* )*

*)*

*or(*

* If(and(CurrentFinancialL == 1, CurrentFinancialC== 1),1) , *

* If(and(CurrentFinancialL== 2,CurrentFinancialC== 1), 2) ,*

* If(and(CurrentFinancialL == 1, CurrentFinancialC == 2), 3)*

*)*

*max(*

*If(and(CurrentFinancialL == 1, CurrentFinancialC == 1), 1, 0),*

*If(and(CurrentFinancialL == 2, CurrentFinancialC == 1), 2, 0),*

*If(and(CurrentFinancialL == 1, CurrentFinancialC == 2), 3, 0)*

*)*

I'm so silly.

I totally forgot the use of the operators... ||

Answer:

If(and(CurrentFinancialL == 1, CurrentFinancialC == 1), 1) ||If(and(CurrentFinancialL == 2, CurrentFinancialC == 1), 2) ||If(and(CurrentFinancialL == 1, CurrentFinancialC == 2), 3)Everyone should check this out https://community.nintex.com/docs/DOC-1501