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 392
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