Stupid Formula Question!

I’m driving myself nuts with what should be a fairly simple formula, so I figured I’d throw it out there.

I have 10 fields on a form that all speak to the same subject and documents could be categorized under any or all of them. For instance, Field One and Field Two could be checked, and I want them to appear under those two categories in a view.

I’m attempting to do this by a formula in the column. It’s something like this:

C1:=@If(RR1 !=“”;“Option 1”;Null);

C2:=@If(RR2 !=“”;“Option 2”;Null);

C3:=@If(RR3 !=“”;“Option 3”;Null);

C4:=@If(RR4 !=“”;“Option 4”;Null);

C5:=@If(RR5 !=“”;“Option 5”;Null);

C6:=@If(RR6 !=“”;“Option 6”;Null);

C7:=@If(RR7 !=“”;“Option 7”;Null);

C8:=@If(RR8 !=“”;“Option 8”;Null);

C9:=@If(RR9 !=“”;“Option 9”;Null);

C10:=@If(RR10 !=“”;“Option 10”;Null);

Display:=@If(@IsNull(C1);Null;C1 & :slight_smile: + @If(@IsNull(C2);Null;C2 & :slight_smile: + @If(@IsNull(C3);Null;C3 & :slight_smile: + @If(@IsNull(C4);Null;C4 & :slight_smile: + @If(@IsNull(C5);Null;C5 & :slight_smile: +

@If(@IsNull(C6);Null;C6 & :slight_smile: + @If(@IsNull(C7);Null;C7 & :slight_smile: + @If(@IsNull(C8);Null;C8 & :slight_smile: + @If(@IsNull(C9);Null;C9 & :slight_smile: + @If(@IsNull(C10);Null;C10);

Display

Without having to redesign the form, any ideas? The problem is that unselected fields show up as “Not Categorized” in the view!

Subject: Stupid Formula Question!

C1:=@If(RR1 !=“”;“Option 1”;“”);C2:=@If(RR2 !=“”;“Option 2”;“”);

C3:=@If(RR3 !=“”;“Option 3”;“”);

C4:=@If(RR4 !=“”;“Option 4”;“”);

C5:=@If(RR5 !=“”;“Option 5”;“”);

C6:=@If(RR6 !=“”;“Option 6”;“”);

C7:=@If(RR7 !=“”;“Option 7”;“”);

C8:=@If(RR8 !=“”;“Option 8”;“”);

C9:=@If(RR9 !=“”;“Option 9”;“”);

C10:=@If(RR10 !=“”;“Option 10”;“”);

@Trim(C1:C2:C3:C4:C5:C6:C7:C8:C9:C10)

“Null” is not a keyword in Formula Language, but it COULD be the name of a field with a very large value (or an unexpected data type) on any given document, so don’t use it in your formulas.

Subject: RE: Stupid Formula Question!

Stan, I pretty much knew Null wasn’t going to work, but I was at my wits’ end, so I was trying anything.

And as soon as I saw that you used Trim, it confirmed how stupid my question was. Thanks for the refresher on the basics!

Subject: RE: Stupid Formula Question!

No stupid questions – it IS possible to write a two-hundred line formula that does the same thing if your brain temporarily blocks @Trim in your visual cortex.

Subject: RE: Stupid Formula Question!

Everybody always says there are no stupid questions, but I don’t think anybody really believes it. There are plenty of stupid questions.

People just say this to encourage others to not hold back from asking for fear of humiliation. While shy people should be encouraged to ask, I think this is going too far; people should hold back from asking until they’ve exercised due diligence to ensure the question they’re about to ask is not overly and unnecessarily stupid.

More to the point would be to reassure potential askers that we will not mock them if it appears they have made some effort to solve the problem themselves, even if the answer seems blindingly obvious.

BTW: I’m not saying the question that started this thread is stupid; I haven’t even really looked at it.