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
Super User III
Super User III

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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,708)