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],"
)
Solved Solved
0 2 388
1 ACCEPTED SOLUTION

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.

View solution in original post

2 REPLIES 2

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.

That did it!
Thank you!

Top Labels in this Space