
Announcements
Hi All
I have an app which has 3 screens
Landing screen - which has a variable OnVisible=Set(CurrentUser,User().FullName)
Edit Screen
Result screen
the Result screen has a dataTable in it which shows the data for the user logged in.
I want to do a sum count of a column values called flex_hours which is populated with a combobox selecting number values 0-10
I have tried SUm formula but i get a delegation warning 😞
Sum(Filter(Flex_resilience,person_name_new = CurrentUser),Value(flex_hours))
Tried this way too
Sum(
Filter(
Flex_resilience,person_name_new = CurrentUser),
Value(flex_hours.selected))
And i tried this too
Sum(
Filter(
Flex_resilience,person_name_new = CurrentUser),
flex_hours.Value)
Any help i would be grateful
Gary
Hi @gazzo1967
To avoid delegation in this case, you can configure as per the below expressions:
1) App Settings -> Advanced Settings -> Data Row Limit for Non-Delegable Queries: 2000
2) Result Screen -> OnVisible -> ClearCollect(MyCollection, Filter(Flex_resilience,person_name_new = CurrentUser))
To get the Sum:
Sum(MyCollection,Value(flex_hours))
Here, I am assuming that flex_hours is the name of a column in Flex_resilience.
Also, if this is not a column and it is dropdown control, then you might need to update the formula as:
Sum(FirstN(MyCollection,flex_hours.Selected.Value),Value(ColumntoPerformSum))
Here, ColumntoPerformSum needs to be replaced with the name of column that you want to use to calculate the sum.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!