Combining multiple field values in a categorized column

This is not the same but may be a corollary to Shawn’s post earlier today.

A form contains four fields that are radio buttons and have the value of Yes or No

The view already has 2 categorized columns in position 1 and 2:

By Value 1

   By Value 2

The idea is to add a third categorized column in position 3 that categorizes on all four Yes or No fields.

So:

By Value 1

  By Value 2

        New Field 1 (If Yes)

        New field 2 (If Yes)

        New Field 3 (If Yes)

        New Field 4 (If Yes)

It looks like this is possible by just making the column categorized and putting in a formula that concatenates the four fields. Does anyone see any potential issues with this construct? And, if so, is there a better way to do this?

formula:

NewField1 : NewField2 : NewField3 : NewField4

I appreciate any feedback. Thanks

Subject: Combining multiple field values in a categorized column

Seems like the formula you’d want in column 3 is@Trim(@If(NewField1=“Yes”;NewField1;“”):

@If(NewField2=“Yes”;“New Field 2”;“”):

@If(NewField3=“Yes”;“New Field 3”;“”):

@If(NewField4=“Yes”;“New Field 4”;“”))

Regards,

Don

Subject: RE: Combining multiple field values in a categorized column

Thanks for the post Don.

I agree the conditions will be helpful.

I might have included in the original post that I want the third column to have only 1 value. So I supposed that means that it is required that only one out of the four be “Yes” at any given time.

Otherwise, there could be the case that one of the categories is: Field1Field3 (eg)

Subject: RE: Combining multiple field values in a categorized column

If you only want the category to appear if one of them is true, you may want a “sub-category” of column 2 rather than another categorized column. If you want something when there is a category or nothing if there isn’t, try this:tmp:=NewField1+NewField2+NewField3+NewField4;

Column2+@If(@Contains(tmp;“Yes”);“\Meets Criteria”;“”)

If you want a category no matter what, this might work:

tmp:=NewField1+NewField2+NewField3+NewField4;

@If(@Contains(tmp;“Yes”);“Meets Criteria”;“Doesn’t Meet Criteria”)

Hope that makes sense,

Don

Subject: RE: Combining multiple field values in a categorized column

Thanks again DonIt does make sense

I’m thinking though that the temp (second case) should be a list:

temp := NewField1 : NewField2, etc.

and not a string NewField1 + Newfield2

Thanks for the suggestions