Help

IF FORMULA issue

Topic Labels: Formulas
867 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Scott_Gardner1
7 - App Architect
7 - App Architect

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
Zack_S
8 - Airtable Astronomer
8 - Airtable Astronomer

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.