Skip to main content
Community site session details

Community site session details

Session Id : ccc2MxTfRlzcSG9sRPMzlW
Power Apps - Building Power Apps
Answered

Forall Gallery collecting all the data in a Gallery

Like (0) ShareShare
ReportReport
Posted on 30 Jan 2023 18:04:44 by 47

Hi,

 

When using the Forall(Gal_session.Allitems, it doesn't seem to collect all that is there. There are about 22 rows for it to collect so the gallery can't show that many rows unless you start scrolling down. The problem that is happening is when hitting the submit button it only collet half the data, but if I scroll down and then hit the submit button it then collects the full set. I'm trying to prepare for just in case the user hits the submit button without scrolling down, making sure it collects all the data. Not sure if everyone else has had this problem.

 

My code is below. There is also an export at the bottom to transfer this data into an excel file, but I don't think that would be the issue since if i scroll down it collects the data fine.

 

Clear(colUsersession)
;
ForAll(
Gal_session.AllItems,
Collect(
colUsersession,
{
ID_Number: ID_number.Text,
Location: Location.Text,
Access_Clear: Access_clear.Selected.Value,
ID_TAG: ID_TAG.Selected.Value,
EW_Flow: EW_Flow.Selected.Value

}
)
);
ExporttoExcel.Run(JSON(colUsersession,JSONFormat.IgnoreBinaryData))

Categories:
  • EK-09102106-0 Profile Picture
    10 on 21 Mar 2025 at 15:59:54
    Forall Gallery collecting all the data in a Gallery
    @Corbitbeeler, Thanks for solving this problem.   How did you do this: Looks like during the submit I need to have it selected all the rows and make sure it reads them before putting them into a collection.
  • Verified answer
    Corbitbeeler Profile Picture
    47 on 02 Feb 2023 at 22:46:25
    Re: Forall Gallery collecting all the data in a Gallery

    Hi I was able to figure the problem out. Looks like during the submit I need to have it selected all the rows and make sure it reads them before putting them into a collecting 🙂 There aren't many rows so its not even a performance hinder.

  • Corbitbeeler Profile Picture
    47 on 30 Jan 2023 at 22:34:06
    Re: Forall Gallery collecting all the data in a Gallery

    Gave this a try but only selects one row still. It needs to loop through all the rows in the gallery the Gallery.allitems is working just it's not grabbing all the data in the gallery section unless I scroll down. It just not putting all the data in the collection part. This is the data in an excel file i'm putting it in. It's grabbing all the way down for the first two rows just the other rows are not being captured unless I scroll down

     

    Corbitbeeler_0-1675117987785.png

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 30 Jan 2023 at 21:33:41
    Re: Forall Gallery collecting all the data in a Gallery

    ClearCollect(
    colUsersession,Safetyshowers) 

  • Corbitbeeler Profile Picture
    47 on 30 Jan 2023 at 20:48:02
    Re: Forall Gallery collecting all the data in a Gallery

    I've tried this to see what result I would get but it only captures one row if I do this method. I'm needing it to capture all rows no

    Clear(colUsersession)
    ;
    Collect(
    colUsersession,
    {
    ID_Number: ID_number.Text,
    Location: Location_Sasol.Text,
    Access_Clear: Access_clear.Selected.Value,
    ID_TAG: ID_TAG.Selected.Value,
    EW_Flow: EW_Flow.Selected.Value

    }
    );

    Corbitbeeler_0-1675111599924.png

     

  • Corbitbeeler Profile Picture
    47 on 30 Jan 2023 at 19:41:45
    Re: Forall Gallery collecting all the data in a Gallery

    Corbitbeeler_0-1675107693143.png

     

    Does this work?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 30 Jan 2023 at 19:37:59
    Re: Forall Gallery collecting all the data in a Gallery

    @Corbitbeeler 

    What I am looking for is something like this:

    !.jpg

  • Corbitbeeler Profile Picture
    47 on 30 Jan 2023 at 19:15:00
    Re: Forall Gallery collecting all the data in a Gallery

    I apologies, the ones with drop down boxes do have property values as well.

     

    So, this is the values that would be for each name. I was looking at the wrong selection when clicking on them.

     

    ID_Number: Thisitem.Title

    Location_sasol: Thisitem.Location

    Acess_Clear: Thisitem.Access_clear

    ID_TAG: Thisitem.ID_TAG

    EW_Flow: Thisitem.EW_Flow

  • Corbitbeeler Profile Picture
    47 on 30 Jan 2023 at 18:57:12
    Re: Forall Gallery collecting all the data in a Gallery

    Technically only two have item properties. 

     

    This data is being pulled from a List.

    ID Number: ThisItem.Title

    Location: ThisItem.Location

     

    The rest of the boxes are drop down selected values as shown below.

    Corbitbeeler_0-1675105005731.png

     

     

     

  • Corbitbeeler Profile Picture
    47 on 30 Jan 2023 at 18:50:37
    Re: Forall Gallery collecting all the data in a Gallery

    Here is the properties forgot to post them 

    Corbitbeeler_1-1675104624016.png

     

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading started