Hello,
I'm encountering delegation issues in Power Apps with the following condition:
If(CountRows(cmb_0_Responsible.SelectedItems)>0,ResponsibleMail in cmb_0_Responsible.SelectedItems.mail,true)&&
This is in a button that creates a collection to filter the data by several filters:
ClearCollect(
colFilteredOrderListPool,
With({locFilterPool:
AddColumns(
AddColumns(
Filter(
Orders,
'Orders (Views)'.'Active Orders',
(txt_0_FilterTitle.Text in Subject || txt_0_FilterTitle.Text in OrderId) &&
If(CountRows(cmb_0_Responsible.SelectedItems)>0, ResponsibleMail in cmb_0_Responsible.SelectedItems.mail, true) &&
If(CountRows(cmb_0_FilterCustomer.SelectedItems)>0, CustomerMail in cmb_0_FilterCustomer.Selected.Mail, true),
If(CountRows(cmb_0_FilterExtCustomer.SelectedItems)>0, CustomerMail in cmb_0_FilterExtCustomer.Selected.'Mail (name)', true),
If(locHideOrders, IsBlank(ResponsibleMail) && IsBlank(Category), true),
If(varCurrentLanguage="de" && CountRows(cmb_0_FilterStatus.SelectedItems)>0,
'Status (order_status)' in cmb_0_FilterStatus.SelectedItems.Value,
'Status (order_status)' in colStatusOrderPool
),
Deleted = locShowDeleted,
'Created On' >= dt_0_FromDate.SelectedDate
),
"Kategorie", Category.Name
),
"Verantwortlich", ResponsibleName
)
},
If(
locSortColumnPool="0",
SortByColumns(locFilterPool, "order_id", If(locSortOrderPool=SortOrder.Ascending, SortOrder.Ascending, SortOrder.Descending), "order_id", SortOrder.Descending),
locSortColumnPool="1",
SortByColumns(locFilterPool, "external_customer", If(locSortOrderPool=SortOrder.Ascending, SortOrder.Ascending, SortOrder.Descending), "order_id", SortOrder.Descending),
locSortColumnPool="2",
SortByColumns(locFilterPool, "createdon", If(locSortOrderPool=SortOrder.Ascending, SortOrder.Ascending, SortOrder.Descending), "order_id", SortOrder.Descending),
locSortColumnPool="3",
SortByColumns(locFilterPool, "due_date", If(locSortOrderPool=SortOrder.Ascending, SortOrder.Ascending, SortOrder.Descending), "order_id", SortOrder.Descending),
locSortColumnPool="4",
SortByColumns(locFilterPool, "Verantwortlich", If(locSortOrderPool=SortOrder.Ascending, SortOrder.Ascending, SortOrder.Descending), "order_id", SortOrder.Descending),
locSortColumnPool="5",
SortByColumns(locFilterPool, "Kategorie", If(locSortOrderPool=SortOrder.Ascending, SortOrder.Ascending, SortOrder.Descending), "order_id", SortOrder.Descending)
)
)
)
In the Items gallery I have this to filter by language:
If(varCurrentLanguage<>"de",
Filter(colFilteredOrderListPool,
'Status (status)' in colStatusOrderPool),
colFilteredOrderListPool)
I'm facing a lot of problems in production where the data is created correctly using flows, suddenly when users are in the app, the data is mess up. ¿Could be the delegation the reason?
Thanks in advance