Calculated field for array | Community
Skip to main content
Level 3
March 1, 2025
Solved

Calculated field for array

  • March 1, 2025
  • 1 reply
  • 449 views

Hi everyone,

 

I have an array field containing checkbox selections: ["Audience:01", "Audience:02"]

 

I want to create a calculated field that:

  • Displays "AUS" if the array contains only "Audience:01".
  • Displays "OCE" if the array contains both "Audience:01" and "Audience:02".

 

I am struggling to get the formula to work as it is an array.

 

Any ideas??

Best answer by Sven-iX

Hi @ab_cdef 

If I understand this correctly, you have a check box field and want a calculated field to display a value depending on the checkbox selections.

 

in the calculated field, try this (it's silly since you have to compare the string representation of the checkbox group)

IF({DE:name of field}="Audience:01", "AUS", IF({DE:name of field}="Audience:01, Audience:02", "OCE",""))

 

1 reply

Sven-iX
Community Advisor
Sven-iXCommunity AdvisorAccepted solution
Community Advisor
March 2, 2025

Hi @ab_cdef 

If I understand this correctly, you have a check box field and want a calculated field to display a value depending on the checkbox selections.

 

in the calculated field, try this (it's silly since you have to compare the string representation of the checkbox group)

IF({DE:name of field}="Audience:01", "AUS", IF({DE:name of field}="Audience:01, Audience:02", "OCE",""))

 

ab_cdefAuthor
Level 3
March 5, 2025

This works beautifully!! Thanks so much! @sven-ix