web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Stacking data from Tex...
Power Apps
Unanswered

Stacking data from Textinput in Gallery to Collection

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

 

I want to collect data from the gallery where numbers have been entered in the TextInput, and store it in a Collection.

 

Example:

This my gallery, I have 4 row and key data in the Textinput 2 Row. (I want to keep data only 2 row.)

CookieNamtarn_0-1717952747696.png

i use Collect function to keep the result from gallery

Collect(    StackData,
    {
        '1.Topic': Title1.Text,
        '2.Result': TextInput1.Text
    })
But the problem is that the result does not meet the objective. In the table, there is only data in the second row. I want to collect the data in both the first and second rows (excluding the third and fourth rows because there are no values entered in the TextInput fields).

CookieNamtarn_2-1717953617920.png

How i can do it?

Thank you in advances

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @CookieNamtarn,

     

    On the Save button's OnSelect you could write the code below that will save all gallery items for which the Text Input control is not blank:

    //Save Button's OnSelect property
    ClearCollect(
     colStackData,
     ForAll(
     //Change GalleryName accordingly
     Filter(
     GalleryName.AllItems,
     !IsBlank(TextInput1.Text)
     ),
     {
     '1.Topic': Title1.Text,
     '2.Result': TextInput1.Text
     }
     )
    )

     


    If this solves your question, would you be so kind as to accept it as a solution✔️

    If you liked my solution, please give it a thumbs up👍

     

    Connect with me: LinkedIn | Blog

  • CookieNamtarn Profile Picture
    on at

    It's work!!!
    Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard