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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Forall Gallery collect...
Power Apps
Answered

Forall Gallery collecting all the data in a Gallery

(0) ShareShare
ReportReport
Posted on 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:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Corbitbeeler 

    Replace Gal_session.AllItems  with the actual Items property of the gallery in your formula including any sorts or filters. 

  • Corbitbeeler Profile Picture
    47 on at

    Maybe I'm just really too new to this but can you give me an example by chance with my provided code. When using the ForAll I need some sort of source. I did try and, but the data doesn't seem acceptable as a source of data for it. It also seems to only catch the first frow not all of them.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Corbitbeeler 

    I'm not sure you need a ForAll(), please post the Items property of the gallery in text in your response. 

  • Corbitbeeler Profile Picture
    47 on at

    Sure! 

    Corbitbeeler_0-1675104311356.png

     

    Here is the code again. I seems it didn't select the location part correctly.

    Clear(colUsersession)
    ;
    ForAll(
    Gal_session.AllItems,
    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

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

     

     

  • Corbitbeeler Profile Picture
    47 on at

    Please note I haven't added all the columns yet i'm testing to make sure it copies all the data correctly before added the rest of the fields so only ID_number, Location_sasol, Access_clear, ID_TAG, EW_FLOW are the only ones being collected here for now.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Corbitbeeler 

    What is the Items property of Gal_session?

  • Corbitbeeler Profile Picture
    47 on at

    Here is the properties forgot to post them 

    Corbitbeeler_1-1675104624016.png

     

  • Corbitbeeler Profile Picture
    47 on at

    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 at

    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

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Corbitbeeler 

    What I am looking for is something like this:

    !.jpg

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 474

#1
Valantis Profile Picture

Valantis 474

#3
WarrenBelz Profile Picture

WarrenBelz 375 Most Valuable Professional

Last 30 days Overall leaderboard