Forum Documentation Showcase Pricing Learn more

How to Store List of Texts on Seperate Line?

I’m storing a list of exercises from a Multidropdown to my database. How do I show this list in a repeating group on a separate line or text?

Or, how do I store each exercise on a separate line in the list?

See below image. I’ve added the text manually to the list and it goes to a seperate line.

Can someone assist? I’m sure it’s easy to solve I just can’t get my head around this.

Maybe @jici or @lottemint.md

I guess this is a list of text. You just need to choose text for the type of the RG and select this field

Or if you mean that the RG is set to the thing and you just want to display it in a text field but on a new line. Use :join with line_break

Is the field itself a list? If so then to display the list as is in a RG, just use a RG of the required type, which may have to be ‘Text’ in this case. If you’re trying to display the list items from multiple records then you may need to use the unique items operator. If the field is not a list then try with the join_with operator.

To add each item as a new row in your table then I think of two ways:
a) Run an API workflow on the list of selected items from your multi-dropdown.
b) Run some sort of recursive workflow where you pass the list to the workflow and run in a loop until all records in the list have been added.

I’ve tried the unique elements, it doesn’t do anything differently than just stack them all in one text cell.

I believe that what @louisadekoya is talking about is if, for example, you get a list of item 1,2,3 and each of them have a list of text a,b,c. So you do search for things’list of test:unique items to avoid repeating a b c for each thing.

1 Like

Please see below screenshot. I can’t seem to get Biceps and Chest on two different buttons. I have 3 horizontal rows in my repeating group.

1

2

Hi Codeables,

The data field muscle group where you have: biceps, chest, added manually: is that a text or a list of texts?

For me list of texts can be displayed in an RG type text e.g. showing this exercises’ muscle groups text. If on buttons not an RG you can use the lists of texts first item on one button, lists 2nd item on another button etc.

If it is instead a text and you want to have every comma mean a new line, you can use regex. I can let you know which regex if that is the case.

I see your updated response. Button need to .be in a RG of type text. Get data from thing’list of text:unique items
On button, use current cell text

2 Likes

Yes, I would like to know what regex code to use. Would definitely be helpful.

For new line you dont need regex. Just :join with line_break

1 Like

But in your case you need to use rg

Maybe it’s me but I don’t understand what you mean by Get data from thing, I only see Get data from external API.

I mean to use something like search or current item. This is hard to tell you exactly because i dont know how you set your thing.
For example, if the current page is training plan thing, this training plan is linked to exercises. Your data source should be current page training’exercises’muscle group:unique item

Please see attached images.

Hi Codeables,

basically both Jici and I are a little confused exactly what your backend/data structure looks like.

Using regex to turn a text into a list of texts is: “this text: extract with Regex”
\s*([^#]+)

1 Like

The setting look correct. But I believe that maybe your multidropdown is not saved correctly to db. Can you show this specific workout from DB

I’ve added images.

Yes. Me it was to use a list of text and instead joining with a comma, join with new line. In your case your start from a text and create a list of text. Anf I believe that it may now be a solution for this case if the text is not really a list of text.