Hello everyone,
I ran into a weird issue and was hoping you could help. I don’t see anything wrong with my code at the moment, but I have checked multiple times and I’m scratching my head.
This is on the OnVisible
property of the screen:
This code stores the data into varUsers
, and I checked the context variables under the same screen. It does have all the data I wanted.
Now, I set varUsers
for the Item
property of three comboboxes:
varUsers
varUsers
varUsers
Here is the part I am struggling with:
Not(IsMatch(DisplayName, ".*\d.*"))
even though it is from the varUsers
variable.AccountEnabled
.I tried this on another tablet and encountered the same issues. One of my colleagues tried the app and is seeing the same issue. If it matters, I am in my developer environment and do have access to the production environment.
I also tried this, but the same issues occurred:
// Copying data from Connection to variable
UpdateContext({varUsers:
Filter(
Office365Users.SearchUserV2({top: 999}).value,
AccountEnabled
&& EndsWith(Mail, "@samplecompany.com")
&& Not(IsMatch(DisplayName, ".*\d.*"))
)
})
I also tried this, but the same issue persists:
// Copying data from Connection to variable
Set(varUsers,
Filter(
Office365Users.SearchUser({top: 999}),
AccountEnabled
&& EndsWith(Mail, "@samplecompany.com")
&& Not(IsMatch(DisplayName, ".*\d.*"))
)
})
Thank you!
EDIT: Removed one line of code just in case for piracy concern.
"Collections in Power Apps can indeed handle data more efficiently in certain scenarios. Here are a few reasons why using a collection might help:
Persistent Storage: Collections are stored in memory and can be accessed throughout the app, making them useful for managing data that needs to be reused across different screens or components.
Performance: Collections can improve performance because they reduce the need to repeatedly query the data source. Once the data is loaded into a collection, it can be accessed quickly without additional calls to the server.
Consistency: Using a collection ensures that the data remains consistent across different controls. Since the data is stored locally, it reduces the risk of discrepancies that might occur due to network latency or other issues.
Flexibility: Collections offer more flexibility for manipulating and filtering data. You can easily add, remove, or update records in a collection, which can be useful for complex data operations.
By using a collection, you might find that the data behaves more predictably and the filters are applied consistently across your comboboxes. Let me know if this helps or if you have any other questions! 😊"
WarrenBelz
146,522
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,890
Most Valuable Professional