cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Save data in columns from multipleline textinput

Hi,

 

What I have is a TextInput with multiple lines like this:

Color 1

Color 2

Color 3

Color 4

Color 5

 

What I want to do is save each line a specific column of a collection, like:

 

C1C2C3C4C5
Color 1Color 2Color 3Color 4Color 5

 

Any ideas of how can I do this?

 

Thanks for your help guys.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Save data in columns from multipleline textinput

Hi @CP0822 ,

Do you want to save each line data within the Multiple Line Text Input into individual columns in a collection?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

2.JPG

 

3.JPG

Set the OnSelect property of the "Collect" button to following:

Collect(
        Collection1, 
        {
            C1: Last(FirstN(Split(TextInput1.Text, Char(10)),1)).Result,
            C2: Last(FirstN(Split(TextInput1.Text, Char(10)),2)).Result,
            C3: Last(FirstN(Split(TextInput1.Text, Char(10)),3)).Result,
            C4: Last(FirstN(Split(TextInput1.Text, Char(10)),4)).Result,
            C5: Last(FirstN(Split(TextInput1.Text, Char(10)),5)).Result
        }
)

when you press the "Collect" button, the collection1 would be populated as below:

4.JPG

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Champion
Community Champion

Re: Save data in columns from multipleline textinput

Hi @CP0822 ,

You can do a collection using Split and the character for a line break Char(10) - I will call your field TextInput1

ClearCollect(
   colColors, 
   Split(
      TextInput1.Text,
      Char(10)
   )
)

colColors will have all your values as separate items. 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Community Support
Community Support

Re: Save data in columns from multipleline textinput

Hi @CP0822 ,

Do you want to save each line data within the Multiple Line Text Input into individual columns in a collection?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

2.JPG

 

3.JPG

Set the OnSelect property of the "Collect" button to following:

Collect(
        Collection1, 
        {
            C1: Last(FirstN(Split(TextInput1.Text, Char(10)),1)).Result,
            C2: Last(FirstN(Split(TextInput1.Text, Char(10)),2)).Result,
            C3: Last(FirstN(Split(TextInput1.Text, Char(10)),3)).Result,
            C4: Last(FirstN(Split(TextInput1.Text, Char(10)),4)).Result,
            C5: Last(FirstN(Split(TextInput1.Text, Char(10)),5)).Result
        }
)

when you press the "Collect" button, the collection1 would be populated as below:

4.JPG

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,814)