Jump to content
  • 0

CASE WHEN PROBLEM


KAPITYAN

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 comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

We reorder the arrangement of the formula that you have since the logic that our formula field is accepting is from top to bottom. However, I just want to clarify the workflow, you want to display only the names which is being selected in your checkbox and if all the checkbox is checked then “Account Manager”. If that is the case, can you please try this formula:

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

Link to comment
Share on other sites

  • 0

Hi, just to add, you may also consider checking and testing this formula:

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

Link to comment
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...