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 / Unable to load all row...
Power Apps
Answered

Unable to load all rows in a gallery with a checkbox ticked to a collection

(0) ShareShare
ReportReport
Posted on by 102

I am trying to create a list of emails from my gallery called - mass_contacts_gallery

I tried to create a collection called bulk_emails_send_list by using this formula

ClearCollect(bulk_emails_send_list,Filter(mass_contacts_gallery.AllItems,[@checkbox_email].Value=true));

my issue is that there are currently 2050 rows of contacts data , and I am not getting all the rows of data added to the collection.  sometimes I only get 155 rows , when it should be 548 rows

The mass_contacts_gallery is also linked to 4 text filters , which work okay

SortByColumns(Filter(bulk_mail_contacts,StartsWith(Region,search_region_email.Text)
,(StartsWith(Country,search_country_email.Text))
,(StartsWith(field_5,search_sm_rep_email.Text))
,(StartsWith(Dataset,search_dataset_email.Text))
,(StartsWith('Dataset Subtype',search_dataset_subtype_email.Text)))


,"field_1",Ascending)

------------------------------------------------------------------------------------------------------

I access the email screen via a button on my home page and I added this code to that button

Navigate(mass_email,ScreenTransition.Fade);
Reset(email_subject);
Reset(email_message);
Reset(search_region_email);
Reset(search_country_email);
Reset(search_sm_rep_email);
Reset(search_dataset_email);
ClearCollect(
bulk_mail_full,
Filter(profiles_full  //profiles_full is a collection
,
Status="Active")
)
;
ClearCollect(
contacts_mail_full,
Filter('All Contacts' //this is the sharepoint list containing the contacts , I appear to get a delegation warning //
,
!IsBlank(field_12))
)
;
ClearCollect(
bulk_mail_contacts,
AddColumns(
contacts_mail_full,
"SR Rep",
LookUp(Master_List, ID = contacts_mail_full[@field_12], SRRep), // i am adding a column of data from another table
"Region",
LookUp(Master_List, ID = contacts_mail_full[@field_12], field_4), // i am adding a column of data from another table
"Country",
LookUp(Master_List, ID = contacts_mail_full[@field_12], field_5), // i am adding a column of data from another table
"Dataset",
LookUp(profiles_full, field_16 = contacts_mail_full[@field_12] && field_15 = contacts_mail_full[@field_13], field_6),
"Dataset Subtype",
LookUp(profiles_full, field_16 = contacts_mail_full[@field_12] && field_15 = contacts_mail_full[@field_13], field_15)
))

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,075 Most Valuable Professional on at

    Hi @JD_26 ,

    Firstly, what do you have your Delegation Limit set to and also it the user checking all the boxes in the gallery, or are they checked as a result of the data loaded ?

    ClearCollect(
     bulk_emails_send_list,
     Filter(
     mass_contacts_gallery.AllItems,
     [@checkbox_email].Value
     )
    );
  • JD_26 Profile Picture
    102 on at

    Hi I have my limit set to 2000 rows , and the checkboxes are pre loaded as ticked

  • WarrenBelz Profile Picture
    153,075 Most Valuable Professional on at

    Hi @JD_26 ,

    Your issue I believe is filtering mass_contracts_gallery.AllItems as Power Apps only loads in batches of 100 records at a time (for performance reasons) as the user scrolls down. Put a Label on the screen with 

    CountRows(mass_contracts_gallery.AllItems)

    and you will see what I mean. You actually need to Collect the data source of the Gallery filtered by the yes/no field (and any other filters applying to the gallery at the time) - so simply duplicate the Gallery Items with the additional filter on the yes/no field and collect that.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • JD_26 Profile Picture
    102 on at

    Thanks for looking into this , could you please provide an example , as I am unsure as to what you mean - 

    You actually need to Collect the data source of the Gallery filtered by the yes/no field (and any other filters applying to the gallery at the time) - so simply duplicate the Gallery Items with the additional filter on the yes/no field and collect that.

  • WarrenBelz Profile Picture
    153,075 Most Valuable Professional on at

    @JD_26 ,

    What is the Items of the Gallery and what is the field name populated in your checkbox ?

  • Verified answer
    JD_26 Profile Picture
    102 on at

    Thanks for looking into this Warren , I eventually resolved the issue , by creating collections for every table , and this fixed all my issues , I was pleasanty suprised how quick a collection can be created from a Sharepoint list and I also managed to resolve the 200 row limit by using the ForAll , which when linked to a collection it worked perfect and a lot quicker ,

    ForAll(mass_contacts_gallery.AllItems,Collect(bulk_mail_full{AccountID:field_12,code:field_2,

    email:field_4,account:field_1,region:Region,country:Country,Dataset:Dataset,

    DatasetSubtype:'Dataset Subtype',SMRep:field_10,ActivityComment:field_4 &" sent " & activity_message.Text}));

  • WarrenBelz Profile Picture
    153,075 Most Valuable Professional on at

    Hi @JD_26 ,
    Firstly, a Collection in itself is a Delegation limitation as is also ForAll (so you have not really resolved the limit) , but if your record numbers are under 2000 rows (which you have said you have set), then yes a collection will resolve your issue.

  • JD_26 Profile Picture
    102 on at

    My solution builds multiple collections and then merges them together , so for example , one table has region column so accounts1 ollection = "EUR", accounts2 ="NOA" , that way I am confident each collection will not be greater than 2000 , then I merge accounts1,accounts2 into one collection using this formula , this way when I use the ForAll , it brings back more than 2000 records , in my cuurent CRM I am building it is already bringing in 4500 records , ClearCollect(accounts,
    account_1,account_2,account_3,account_4,account_5,account_6,account_7,account_8,account_9,account_10,account_11);

  • WarrenBelz Profile Picture
    153,075 Most Valuable Professional on at

    @JD_26 ,

    I am still a bit intrigued how ForAll(Galllery.AllItems . . . gets all the records when you have not scrolled the gallery, however there is a better way of making a big collection - if you add the additional filter/s to the bottom filter in this blog article of mine, you can collect the whole filtered list in one action.

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard