Jump to content
  • 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.

Link to post
Share on other sites

2 answers to this question

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

Link to post
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

Loading...
×
×
  • Create New...