I have a nested If statement that checks a field then does a pull data on different csv files. It is working as intended however I need to add to it. I need a new if statement to check two fields for certain values then add in a fixed value if those two fields in a specific combination show up.
For Example in plain text: If Field "Measurement Type" = "Primary Facilities" and Field "Hot_Spot_temp" is greather than 150 set the priority field to 10.
in Survey123 it should look something like this however I have butchered the syntax and I'm having a hard time figuring out where it's failing:
if($Thermal_Measurement_Type} = "Primary Facilities' and number(${Hot_Spot_Temp}) > 150, '10', 0)
The entire nested if statement looks like this:
if(${Thermal_Measurement_Type} = 'Primary Facilities', pulldata('Primary_Facilities_Priority', 'Priority', 'Rise', ${Hot_Spot_Above_Reference}),
if(${Thermal_Measurement_Type} = 'Secondary Facilities', pulldata('Secondary_Facilities_Priority', 'Priority', 'Rise', ${Hot_Spot_Above_Reference}),
if(${Thermal_Measurement_Type} = 'Indirect Measurements', pulldata('Indirect_Measurements_Priority', 'Priority', 'Rise', ${Hot_Spot_Above_Reference}),
if($Thermal_Measurement_Type} = "Primary Facilities' and number(${Hot_Spot_Temp}) > 150, '10'), 0)))
Edited the code to make it a little easier to read