Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

IF FORMULA issue

Topic Labels: Formulas
161 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Quick question, I need the Item Description to not be blank at all times (I need to see it in the primary field regardless), the way this is set up - the task needs to be selected to make the Item Description appear, thoughts?

IF(
AND(
{ITEM DESCRIPTION},
{TASK TYPE},
NOT(
{TASK NAME}
)
),
{ITEM DESCRIPTION} & " - " & {TASK TYPE},
IF(
AND(
{ITEM DESCRIPTION},
{TASK TYPE},
{TASK NAME}
),
{ITEM DESCRIPTION} & " - " & {TASK TYPE} & ": " & {TASK NAME}
)
)

2 Replies 2

As long as I understood your question correctly, this should work.

IF(AND({ITEM DESCRIPTION},{TASK TYPE}, {TASK NAME}), CONCATENATE({ITEM DESCRIPTION}," - ",{TASK TYPE},": ",{TASK NAME}),IF(AND({ITEM DESCRIPTION},{TASK TYPE}), CONCATENATE({ITEM DESCRIPTION}, " - ",{TASK TYPE}), {ITEM DESCRIPTION}))

Hey @Scott_Gardner1!

Assuming you are always going to have a value in the Item Description field, this formula should work for you:

IF(
    {ITEM DESCRIPTION},
    {ITEM DESCRIPTION} & IF(
        {TASK TYPE},
        " - " & {TASK TYPE}
    ) & IF(
        {TASK NAME},
        ": " & {TASK NAME}
    )
)

image


This formula, as shown above, will not return anything if there is not an Item Description, to begin with.
If you want to display the rest of the values regardless of whether or not the Item Description is provided, then you can use this structure instead:

IF(
    {ITEM DESCRIPTION},
    {ITEM DESCRIPTION} & IF(
        {TASK TYPE},
        " - " & {TASK TYPE}
    ) & IF(
        {TASK NAME},
        ": " & {TASK NAME}
    ),
    IF(
        OR(
            {TASK NAME},
            {TASK TYPE}
        ),
        IF(
            {TASK TYPE},
            {TASK TYPE} & IF(
                {TASK NAME},
                ": " & {TASK NAME}
            ),
            IF(
                {TASK NAME},
                {TASK NAME}
            )
        )
    )
)

That formula will return this behavior:

image


Edit:

Changed the field names to be capitalized like your example.