Expand my Community achievements bar.

Don't miss out on our March Adobe Workfront events!
SOLVED

Calculated field for array

Avatar

Level 2

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??

1 Accepted Solution

Avatar

Correct answer by
Level 7

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",""))

SveniX_0-1740915687233.png

 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 7

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",""))

SveniX_0-1740915687233.png

 

Avatar

Level 2

This works beautifully!! Thanks so much! @Sven-iX