Discussions

View Only

formula compilation help

• 1.  formula compilation help

Bronze
Contributor
Posted 04-18-2018 05:12
I just need some direction on how to compile an if type formula:

I have a questionnaire with a list of approx 20 "Yes" "No" "N/A" options in each (drop down list)

I want to create a quick formula that checks all questions.  If any of the questions have the answer "No" it will give me a "Non-compliance" result,

and if they are all yes it will give me a "Compliant" result

not sure if this is done with an if statement or not?

• 2.  RE: formula compilation help

Silver
Contributor
Posted 04-18-2018 05:15
Hi Geoffery,

What happens if some select N/A from the drop-down list? Do you want to show something?

Thanks,
Gaurav

• 3.  RE: formula compilation help

Bronze
Contributor
Posted 04-18-2018 05:16
N/A will be the same as "Yes" since it wont have an impact on the final result

• 4.  RE: formula compilation help

Silver
Contributor
Posted 04-18-2018 05:26
Okay. Here you go.

Create a formula-text field and use the below formula.

`If([Your drop down field]<>"",  If([Your drop down field]="No","Non-compliance", "Compliant"),"")`
Thanks,
Gaurav

• 5.  RE: formula compilation help

Bronze
Contributor
Posted 04-18-2018 05:42
Thanks - How would i stretch this formula across to include all 20 fields?

` `

• 6.  RE: formula compilation help

Posted 04-18-2018 13:48

I do something like this assigning a numeric value to the responses and add them together.  Then set up a rule to update your field to compliant as long as this formula field = the total number of questions.

If([Question1]="No",0,1)
+If([Question2]="No",0,1)
+If([Question3]="No",0,1)
+If([Question4]="No",0,1)
+If([Question5]="No",0,1)
+If([Question6]="No",0,1)

• 7.  RE: formula compilation help

Bronze
Contributor
Posted 04-18-2018 13:50
Very clever!  This will work!  thanks!