You are viewing limited content. For full access, please sign in.

Question

Question

Forms Calculations with variables

asked on July 5, 2019 Show version history

Hello,

I am trying to create a Time sheet for users in Forms.

I want users to be able to enter their regular rate of (1)[variable is fstRate], and then for each date enter if there was a special rate ie: 1.5 (2), and have the rate for that day/time displayed in 'Rate' for that date (3)

So if users regular rate is 1.5 (1), and they had special rate of 1.5 for a day (2), then the total rate should be 2.25(3)

The Formula I am using in Date Rate (3) is =IF(Rate_Type=1.5,fstRate*1.5,fstRate).

However when testing I keep getting the error "This field contains Calculation error. References: Rate Type."  

What am I doing wrong in this calculation, is this issue that Rate Type field is a drop-down rather than a number?

Thank you,

Darren

0 0

Answer

SELECTED ANSWER
replied on July 5, 2019

You are correct that a drop-down is treated as text not a number so it is having issues calculating it out.  However, if you wrap the drop-down field in the VALUE() function, it will turn it into a number.  You probably need to add INDEX and ROW so each row of the table calculates on it's own numbers.

 

Not sure if you need the IF part of the calculation.  Don't you always want to calculate it?  In my example, my rate field is a number field and my Rate Type field is a drop-down field.  I have it calculating all the time, not just if the rate type is 1.5 (or other value).

DropDownCalculation.png
0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.