CONCATENATE() - help!

I’m trying to “recreate” this text string…

[‘toTrain’, ‘Walk to train stop’, null, null, null, toMilliseconds(5), 100, null],

And, this expression won’t pass the expression editor

CONCATENATE(
    "['",
    [task_key],
    "', ",
    [task_key],
    "', null, null, null, ",
    [VC_ms],
    ", 50, null],"
)

Try adding a space after the single quote if you need to use one at the end of a string. For example:

CONCATENATE(
    "[' ",
    [task_key],
    "', ",
    [task_key],
    "', null, null, null, ",
    [VC_ms],
    ", 50, null],"
)

If the spacing is important and you can’t add a new space character, you can use TRIM, something like this:

CONCATENATE(
    TRIM("[' "),
    [task_key],
    "', ",
    [task_key],
    "', null, null, null, ",
    [VC_ms],
    ", 50, null],"
)

This happens because AppSheet’s formulas try to follow the conventions set by Excel formulas.

6 Likes

That did it!
Thank you!

2 Likes