
Howdy PowerApp Experts!,
I have a challenge with a recent app that I built for skills tracking in our business. The way it works is that one screen writes information into a SharePoint List as people select their skill level the "OnChange" patches that data back into a SP List called MatrixNetwork. To view a persons skills a ClearCollect is conducted, filtering on a user's email address from the MatrixNetwork list and presenting it on another screen in a gallery.
Code snip below of the ClearCollect that is applied to the OnSelect property of a "Search" button.
Set(varSelectedUser,cbo_staff_email.Selected.Mail)
;
If(
IsBlank(varSelectedUser),
UpdateContext({locSearchProfile: Blank()}),
UpdateContext({locSearchProfile: Office365Users.UserProfileV2(varSelectedUser)})
);
ClearCollect(
col_userskills,
Sort(
Filter(
Filter(
MatrixNetwork,
StaffEmail = varSelectedUser
),
UserLevel = "1 - Awareness" || UserLevel = "2 - Understanding" || UserLevel = "3 - Ability" || UserLevel = "4 - Mastery" || UserLevel = "5 - Expertise" || DeveloperLevel = "Interested" || DeveloperLevel = "Basic" || DeveloperLevel = "Intermediate" || DeveloperLevel = "Advanced"
),
Title,
SortOrder.Ascending
)
)
The challenge I have is that the MatrixNetwork list that is being filtered on in my ClearCollect is now 6000+ records long, thus posing challenges with PowerApps retrieving data. I have set the "data row limit" to 2000 already however, the ClearCollect is not working/pulling information into a collection.
I need to find a way that I can retrieve the competencies of a person by filtering on their email address from the large database.
Any guidance that can be provided would be appreciated! 🙂
Try this, which will hopefully get your query below the row limit:
Set(varSelectedUser,cbo_staff_email.Selected.Mail)
;
If(
IsBlank(varSelectedUser),
UpdateContext({locSearchProfile: Blank()}),
UpdateContext({locSearchProfile: Office365Users.UserProfileV2(varSelectedUser)})
);
With({aFilter: Filter(MatrixNetwork, StaffEmail = varSelectedUser)},
ClearCollect(
col_userskills,
Sort(
Filter(aFilter,
UserLevel = "1 - Awareness" || UserLevel = "2 - Understanding" || UserLevel = "3 - Ability" || UserLevel = "4 - Mastery" || UserLevel = "5 - Expertise" || DeveloperLevel = "Interested" || DeveloperLevel = "Basic" || DeveloperLevel = "Intermediate" || DeveloperLevel = "Advanced"
),
Title,
SortOrder.Ascending
)
))
Hope that helps,
Bryan