Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

Write formulas with line breaks in the field

cancel
Showing results for 
Search instead for 
Did you mean: 
Tom_Lucido
5 - Automation Enthusiast
5 - Automation Enthusiast

I wish I could write formulas with line breaks so that it’s easier to read, comprehend, and modify. For instance, I wish the first formula could be written like the second. It currently returns an error.

Current:

IF(FIND( “engineer”,LOWER( {Collateral Title})) > 0, “Engineer”,IF(FIND( “engineer”,LOWER( {Overview / Short-form content} )) > 0,“Engineer”,IF(FIND( “engineer”,LOWER( {Preloaded Topic} )) > 0,“Engineer”,IF(FIND( “coding”,LOWER( {Collateral Title} )) > 0,“Engineer”,IF(FIND( “coding”,LOWER( {Overview / Short-form content} )) > 0,“Engineer”,IF(FIND( “coding”,LOWER( {Preloaded Topic} ))>0,“Engineer”, IF(FIND( “developer”,LOWER( {Collateral Title})) > 0,“Engineer”,IF(FIND( “developer”,LOWER( {Overview / Short-form content} )) > 0,“Engineer”,IF(FIND( “developer”,LOWER( {Preloaded Topic} )) >0,“Engineer”,"")))))))))

Desired:

IF(FIND( “engineer”,
LOWER( {Collateral Title})) > 0,
“Engineer”,

IF(FIND( “engineer”,
LOWER( {Overview / Short-form content} )) > 0,
“Engineer”,

IF(FIND( “engineer”,
LOWER( {Preloaded Topic} )) > 0,
“Engineer”,

IF(FIND( “coding”,
LOWER( {Collateral Title} )) > 0,
“Engineer”,

IF(FIND( “coding” ,
LOWER( {Overview / Short-form content} )) > 0,
“Engineer”,

IF(FIND( “coding”,
LOWER( {Preloaded Topic} ))>0,
“Engineer”,

IF(FIND( “developer”,
LOWER( {Collateral Title})) > 0,
“Engineer”,

IF(FIND( “developer”,
LOWER( {Overview / Short-form content} )) > 0,
“Engineer”,

IF(FIND( “developer”,
LOWER( {Preloaded Topic} )) >0,
“Engineer”,

“”)))))))))

2 Comments
W_Vann_Hall
13 - Mars
13 - Mars

You can create formulas with indentation, white space, and the like; however, to do it and still retain your sanity, you probably need to do so using an external editor and paste the complete formula into the formula field. The ability to do so is critical for crafting complex formulas, as you’ve discovered; there is no way I could have written and debugged this, this, or this online.

I copied your second example and (1) corrected for curly quotes ("/" instead of “/”, which the forum adds) and (2) added indentation. This works perfectly well when copied-and-pasted into Airtable:

IF(
    FIND(
        "engineer",
        LOWER(
            {Collateral Title}
            )
        ) > 0,
    "Engineer",

    IF(
        FIND(
            "engineer",
            LOWER(
                {Overview / Short-form content}
                )
            ) > 0,
        "Engineer",

        IF(
            FIND(
                "engineer",
                LOWER(
                    {Preloaded Topic} 
                    )
                ) > 0,
            "Engineer",

            IF(
                FIND(
                    "coding",
                    LOWER(
                        {Collateral Title}
                        )
                    ) > 0,
                "Engineer",

                IF(
                    FIND(
                        "coding" ,
                        LOWER(
                            {Overview / Short-form content}
                            )
                        ) > 0,
                    "Engineer",

                    IF(
                        FIND(
                            "coding",
                            LOWER(
                                {Preloaded Topic} 
                                )
                            )>0,
                        "Engineer",

                        IF(
                            FIND(
                                "developer",
                                LOWER(
                                    {Collateral Title}
                                    )
                                ) > 0,
                            "Engineer",

                            IF(
                                FIND(
                                    "developer",
                                    LOWER(
                                        {Overview / Short-form content}
                                        )
                                    ) > 0,
                                "Engineer",

                                IF(
                                    FIND(
                                        "developer",
                                        LOWER(
                                            {Preloaded Topic}
                                            )
                                        ) >0,
                                    "Engineer",

                                    ""
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )

I’m not sure why it was throwing an error, unless it has to do with the quotes; I made no other corrections. (Obviously, I created a scratch table with three fields named the same as yours.)

Personally, I’m a big fan of Notepad++ as an offline editor for Airtable, in part because it does automatic marking of paired parentheses, which makes it easy to find unmatched ones. Np++ is a Windows app, but there are comparable ones available for other OSes.

Tom_Lucido
5 - Automation Enthusiast
5 - Automation Enthusiast

You’re totally right. I must have just had a typo in there somewhere. Thank you W_Vann_Hall!

And I’ll check out NP++