I have a column called description, it will give description of my purchase, which picked up from several fields. in this simplified example, I haveFieldVehicleType
FieldVehicleColour
FieldVeheicleYear
so if I have bought a Red Toyota Camry from 2004, it will displayed "I bought a passenger car, the colour is Red and the year registered was 2004.
In this case:
FieldVehicleType:“Toyota Camry”
FieldVehicleColour:“Red”
FieldVeheicleYear"2004".
I used @if formula for each condition above, eg,
@if(FieldVehicleType=“”;“”;“I bought a “+FieldVehicleType;””) : @if(FieldVehicleColour=“”;“”“;” the colour is "+FieldVehicleColour):@if(field…
any better way to simpify this, as I can’t save it, due to overloading formula and columns…
Subject: Simplifying 70 @if formula for text column
Are there circumstances where you have some values but not others? In the example you give this wouldn’t make sense. If all values are present then you could simplify your formula to only have the @If on the first field:
@if( FieldVehicleType = “” ; “” "I bought a " + FieldVehicleType + ", the colour is " + FieldVehicleColour + " and the year is " + FieldVehicleYear )
Subject: RE: Simplifying 70 @if formula for text column
My examples were simplified. thus, sometime some fields have some values, other times, other fields would have values. Would really appreciate if you have a more brilliant idea of how to overcome this, maybe using other formulas instead, which I do not realised.
Subject: RE: Simplifying 70 @if formula for text column
So you have a humonguous formula that refers to many, many fields. The formula is so long that you can’t save it in Designer.
Even if you could do this, it’s a bad idea to have such a long formula in a view. Performance will be very poor.
If you must do this, you could calculate the value in the form instead, and store it in a separate field, so that the column can just refer to that field. It wouldn’t have to be a formula then; you could write it in LotusScript. However, if the field contains a lot of characters, it can still make your view slow, or it could exceed the limit of summary data in a document, so that you can’t save the document.
It might also be possible to write a shorter formula if there is some pattern to the field names and the extra text you want to add, so that you could use a loop.