  Scholar

## Nintex Form calculated field if statement

Hi Everyone,

I have a question relating to a calculated field in a Nintex for SP2013 environment.

I have several drop down fields with numeric values which are summed together in a calculated field called 3TotalValue.

I then have another calculated field called 3TotalRatingText which I am trying to auto populate with a text value, which is determined based on the value in the first calulated field 3TotalValue.

I am currently using the forumula shown below:
=IF(3TotalValue>=45, "Large", IF(3TotalValue>=26, "Medium", IF(3TotalValue<=25,"Small")))

But when loading the form or previewing it, the whole form is blank, so obviously something is seriously wrong.

I also have a second set of logic I need to apply, being that if any of the individual drop down values used to origionally determine 3TotalValue are > 4, the value of 3TotalRatingText should be changed from Small to Medium. Of course if 3TotalValue is already >=26, it is Medium, and if >=45, it is Large.

Does all of this make sense?

Can anyone help?

Your assistance, as always, is much appreciated.

8 Replies Collaborator

## Re: Nintex Form calculated field if statement

@dean_white ....your formula is wrong. It should be "If" and not "IF" and in last If it's missing what if false.

Also the logic is not correct too, because, let's assume "3TotalValue" = 80

• 1st condition - 3TotalValue >= 45 is true and also 3TotalValue>=26 is also true
• Are you using correct operators for comparison?

If you're using 3 condition then you only need 2 If statements....

If(condition1, True, If(condition2, True, False)) - So for 3rd condition outcome will be taken care by false part of If statement.

Also, if you're logic on the form is controlling the value and don't want users to modify it, I'll recommend to use calculated control and connect it to SLT list column in SP. Scholar

## Re: Nintex Form calculated field if statement

I am gettings closer in the first stage.

So far I have this below, but I also need to add in the clause that if it is 45 or greater, it is "Large".

Can anyone assist with adding that bit in?

if(greaterThan(3TotalValue,25),"Medium","Small")

Once I have this sorted I can move on to the next bit.

Thanks Collaborator

## Re: Nintex Form calculated field if statement

@dean_white .....I did mention before....your conditions are not correct....there are 2 situations where your values have 2 conditions true i.e. 3TotalValue >=26 and also 3TotalValue >= 45....for e.g. 3TotalValue = 50 in this case will it be medium or large?

I think you need below condition......since I'm not sure about your requirement and process, I just guessed here.....

If(3TotalValue <= 26, "Small", If(and(3TotalValue > 26, 3TotalValue <=45), "Medium","Large")) Scholar

## Re: Nintex Form calculated field if statement Scholar

## Re: Nintex Form calculated field if statement

Hi All,

I have replaced "TRUE" with "OVRY" in the statement below in case that was causing some issues, but when the form loads, I am getting the message shown below. Can anyone please provide some suggestions on where I am stuffing this up?

if(3TotalValue>=45,"Large",if(or(and(3TotalValue>25,3TotalValue<=44),3IRSmallOverride="OVRY"),"Medium","Small")) I have it working in Excel with the formula below, but just cannot get it working in Nintex:

IF(B9>=45,"Large",IF(OR(AND(B9>25,A9<=44),C9="OVRY"),"Medium","Small")) Scholar

## Re: Nintex Form calculated field if statement

Correction,  formula that works in excel is:

IF(B9>=45,"Large",IF(OR(AND(B9>25,B9<=44),C9="OVRY"),"Medium","Small"))  Nintex Employee

## Re: Nintex Form calculated field if statement

= is for assigning a value == is for comparing so your formula should be:

if(3TotalValue>=45,"Large",if(or(and(3TotalValue>25,3TotalValue<=44),3IRSmallOverride=="OVRY"),"Medium","Small")) Scholar