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

Question

Question

Help Creating an IF statement on a form.

asked on February 7 Show version history

I'm trying to return a value of 325 in a field if two criteria are met and 0 if one or more of the criteria are not met, and I haven't had any luck with either Chat GPT or the Laserfiche AI, so I'm reaching out to actual human beings.

 

The two fields that are part of the criteria are:

     Device Type, a drop-down field, and

     Computer Inspection Report, a radio button field.

 

The choices for Device Type are

     Chromebook
     Macbook Laptop
     Windows Laptop

 

The choices for Computer Inspection Report are

     Computer returned with no visible damage to it
     Lost computer
     Damaged computer
     Assigned computer's asset tag # does not match that of the returned computer

 

I would like a currency field named Lost Chromebook Fee to have a value of 325 when Device Type is Chromebook and Computer Inspection Report is Lost Computer, but have a value of 0 when one or both of those conditions is not met. I'm open to changing this field to a single-line text field if necessary. 

 

Does anyone have any advice on this statement? Here are some failed results from Laserfiche AI and another AI system.

  • =IF(AND(TEXT(DeviceType)="Chromebook",(ComputerInspectionReport)="Lost computer","325","0")
  • IF (Device_Type == "Chromebook" AND Computer_Inspection_Report == "Lost computer") THEN 

         Return_Value = 325 
         ELSE 
              Return_Value = 0

  • =IF(DeviceType) ="Chromebook" AND (ComputerInspectionReport)="Lost computer", "325"," 0")

 

 

Device Type Drop-down.jpg
Computer Inspection Report Radio Button.jpg
Lost Chromebook Fee.jpg
0 0

Replies

replied on February 7

Hi John, if both items need to be true for the 325, the calculation should look like this.

=IF(AND(DeviceType="Chromebook",ComputerInspectionReport="Lost computer"), "325"," 0")
 

If Only one value needs to be true for the $325 to apply, the calculation would be 
=IF(OR(DeviceType="Chromebook",ComputerInspectionReport="Lost computer"), "325"," 0")

 

0 0
replied on February 7

Steven,

 

Thank you!

 

That worked!

0 0
replied on February 10

Steve's answer is correct. Just wanted to leave this here for reference:

 

  • AND – =IF(AND(Something is True, Something else is True), Value if True, Value if False)

  • OR – =IF(OR(Something is True, Something else is True), Value if True, Value if False)

  • NOT – =IF(NOT(Something is True), Value if True, Value if False)

0 0
replied on February 10

Okay... so here's a follow up.

 

We don't apply a fee for lost or damaged chargers when a computer is lost, but we do apply a fee when there is no damage to the device or if the device is damaged.

 

This equation doesn't return an error, but the amount is still populating.

=IF(AND(ChargerInspectionReport="Damaged charger",ComputerInspectionReport!="Lost computer",ComputerInspectionReport!="Assigned computer's asset tag # does not match that of the returned computer"), "20"," 0")

 

The 20 also shows up in a Total Fees field that contains this SUM function despite a field rule (attached) that is supposed to hide the lost and damaged charger fees. 

=SUM(LostComputerFee,LostChargerFee,DamagedChargerFee,DamagedComputerFee,UnassignedComputerReturnedFee)

 

Does anyone have any additional advice?

 

Thank you,

 

John

Hide Fees  - Lost Computer.jpg
0 0
replied on February 12

If you are using Cloud and have these complicated scenarios with If statements, it typically is a great use case to use a DecisionTable instead of trying to put all of the permutations in an IF statement. It can also make it easier to follow the logic

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

Sign in to reply to this post.