Help

Creating an IF statement for multiple options in a Field

Topic Labels: Formulas
Solved
Jump to Solution
2363 3
cancel
Showing results for 
Search instead for 
Did you mean: 
jamiepjordan
4 - Data Explorer
4 - Data Explorer

I'm new to coding so I'm a bit out of my depth.

I have a "Multiple Select" field and I'm trying to create a new field which counts how many selections were made for each record.

The items are given a rating depending on how many selections they can tick.

I have the below but I'm certain I'm making lots of very basic errors.
Any suggestions would be greatly appreciated.

{Sustainability Rating} = "n",

(("n" = 0)

IF({Sustainability Checklist}, "Is the item plastic free?", "n"+1),
IF({Sustainability Checklist}, "Is the item made from recycled material?", "n"+1),
IF({Sustainability Checklist}, "Is the item fully recyclable?", "n"+1)
)

1 Solution

Accepted Solutions
bruceconsulting
7 - App Architect
7 - App Architect

Hi,

You would think it would be an IF formula, but it's not. 

Here's the formula you want:

IF({Sustainability Checklist},LEN({Sustainability Checklist})-LEN(SUBSTITUTE({Sustainability Checklist},",",""))+1)

If you want to talk about this further or if you ever need additional help, please schedule some time with me.  Here's my Calendly link: 
https://calendly.com/d/ymz-t3t-fnp/30-minute-help-meeting

Jody

 

 

See Solution in Thread

3 Replies 3
bruceconsulting
7 - App Architect
7 - App Architect

Hi,

You would think it would be an IF formula, but it's not. 

Here's the formula you want:

IF({Sustainability Checklist},LEN({Sustainability Checklist})-LEN(SUBSTITUTE({Sustainability Checklist},",",""))+1)

If you want to talk about this further or if you ever need additional help, please schedule some time with me.  Here's my Calendly link: 
https://calendly.com/d/ymz-t3t-fnp/30-minute-help-meeting

Jody

 

 

Thanks so much Jody.

I'll have a play with this tomorrow and let you know how I get on.

Much appreciated.
J

airballer86
7 - App Architect
7 - App Architect

Thank you @bruceconsulting for this solve! It's been driving me crazy!