You are viewing limited content. For full access, please sign in.

Question

Question

Need to create concatenated list of values from first column of table and insert into multi-line text box

asked on August 18, 2022

I have a table with multiple customer records.  I'd like to be able to loop through the table and extract each customer's name into a comma separated list to place into a multi-line text box.  I'm assuming I'll need to use javascript for this, so if someone can help get me going with an example I would appreciate it very much.  Here's a snapshot of the fields in question.

The goal is to populate q140 with a comma separated list of customer names from the table class coverletterCustomers and update that list every time a new customer (class "internalCustomerSelect") is added.

Thanks in advance for any assistance.

 

0 0

Answer

SELECTED ANSWER
replied on August 18, 2022 Show version history

The column variable will return a comma-separated list by default if you don't use an index, so all you really need to do is add a calculation and set it equal the that variable.

You can make the field read-only and it will still work.

The calculation would get more complicated if you wanted to ignore empty rows or add a space after the comma or something.

For example,

To add a space after each item, instead of just returning the column variable directly, you could use the JOIN function.

=JOIN(", ",Table.Column)

1 0
replied on August 18, 2022

Thanks Jason!  I always learn something new from you and Matthew.

 

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.