• 0

# CASE WHEN PROBLEM

## Question

We have a few column names with yes/no data type. I want to have a formula that will put the persons name in the accountable column if name is marked true.

Here's the formula:
CASE WHEN [@field:Stack] = 'TRUE' THEN 'Stack'
WHEN [@field:Lucy]= 'TRUE' THEN 'Lucy'
WHEN [@field:Lucy]= 'TRUE' AND [@field:Stack] = 'TRUE' THEN 'Stack , Lucy'
WHEN [@field:Lucy]= 'TRUE' AND[@field:Stack] = 'TRUE' AND [@field:Edward] = 'TRUE' AND [@field:Sebby] = 'TRUE' AND[@field:Maria] = 'TRUE' THEN 'Account manager'
END

If 2 names are marked true it only gives me 1 name in the accountable column. What I really want is a formula to put the column names in that field if true I don't want to list every type of combination that could be There are 6 names that can be marked true so there can be a lot more combinations.

## Recommended Posts

• 0

Hello @KAPITYAN,

If you're using a submission form, you can try to use this formula instead:

```CASE WHEN [@field:Stack] = 1 AND  [@field:Lucy] = 0  AND [@field:Edward]= 0 AND [@field:Sebby]= 0 AND [@field:Maria] = 0 THEN 'Stack'
WHEN  [@field:Lucy]= 1 AND [@field:Stack] = 0 AND [@field:Edward] = 0 AND [@field:Sebby] = 0  AND [@field:Maria] = 0 THEN 'Lucy'
WHEN  [@field:Lucy] = 1 AND [@field:Stack] = 1 AND [@field:Edward] = 0 AND [@field:Sebby] = 0 AND [@field:Maria] = 0 THEN 'Stack , Lucy'
WHEN  [@field:Lucy] = 1 AND[@field:Stack] = 1 AND [@field:Edward] = 1 AND [@field:Sebby] = 1 AND [@field:Maria] = 1 THEN 'Account Manager'
END```

I hope this works now.

-Barbie

• 0

- Barbie

##### Share on other sites

• 0

Hi, it seems that you have submitted twice your question, I answered that here:

CASE
WHEN [@field:Lucy]= 'TRUE' AND [@field:Stack] = 'TRUE' AND [@field:Edward] = 'TRUE' AND [@field:Sebby] = 'TRUE' AND [@field:Maria] = 'TRUE' THEN 'Account Manager' ELSE
CASE
WHEN [@field:Lucy]= 'TRUE' THEN 'LUCY' ELSE ' '
END + ' ' + CASE
WHEN [@field:Stack]= 'TRUE' THEN 'STACK' ELSE ' '
END + ' ' +
CASE
WHEN [@field:Edward]= 'TRUE' THEN 'EDWARD' ELSE ' '
END + ' ' + CASE
WHEN [@field:Sebby]= 'TRUE' THEN 'SEBBY' ELSE ' '
END + ' ' + CASE
WHEN [@field:Maria]= 'TRUE' THEN 'MARIA' ELSE ' '
END
END

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×