Looking for opposite of split()

Hi,

I am still pretty new to Appsheet so sorry if I have missed this. I am looking to send an email to 1 or two users whose emails will be in child records of the table where the send email action goes.

I can get the list of emails using the virtual column pointing to the child records. However, this returns a list.

For the start email action to work, I need a string containing the emails separated by semi colon like โ€œemail1@domain.com ; email2@domain.comโ€.

So I am looking for a function doing the opposite of SPLIT() but I canโ€™t find one. In PHP. split is the same as explode() so I guess I am looking for implode().

I think it can be done using CONCATENATE and sorted SELECT statements but it seems a bit cumbersome, in particular if you donโ€™t know if you have 1, 2 or 3 child records.

Is there an easy way to do this?

Solved Solved
0 2 452
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Thatโ€™s the way to do it. CONCATENATE() will produce a comma-separated Text value. If you need semicolons instead, wrap CONCATENATE() with SUBSTITUTE():

SUBSTITUTE(
  CONCATENATE(
    SORT(
      UNIQUE(
        [Related child-columns][email-column]
      )
    )
  ),
  ",",
  ";"
)

See also:




View solution in original post

2 REPLIES 2

Steve
Platinum 4
Platinum 4

Thatโ€™s the way to do it. CONCATENATE() will produce a comma-separated Text value. If you need semicolons instead, wrap CONCATENATE() with SUBSTITUTE():

SUBSTITUTE(
  CONCATENATE(
    SORT(
      UNIQUE(
        [Related child-columns][email-column]
      )
    )
  ),
  ",",
  ";"
)

See also:




Brilliant! I didnโ€™t realise that CONCATENATE() could take a list as its argument. It works like a charm!

Thanks for your help!

Top Labels in this Space