Hello everyone,
I got really strange behavior here, maybe someone can explain what is happening?
Basically following formula works only if there is "Lower" but it does not matter in which part? If I remove "Lower" from both emails, formula stop working. I'm using similar formula in other places and it works fine without "Lower", this happens only when used with "AddColumns".
WORKS:
AddColumns(
SPlist1,
"SortField1",
CountRows(Filter(Sort(SPlist2,ID,Descending),
Lower(List1Person.Email) = List2person.Email))
WORKS:
AddColumns(
SPlist1,
"SortField1",
CountRows(Filter(Sort(SPlist2,ID,Descending),
List1Person.Email = Lower(List2person.Email) ))
DOES NOT WORK:
AddColumns(
SPlist1,
"SortField1",
CountRows(Filter(Sort(SPlist2,ID,Descending),
List1Person.Email = List2person.Email))
Solved! Go to Solution.
Hi @Kubo ,
If Delegation is your issue, you can try this
With(
{
wList:
Filter(
Sort(
SPlist2,
ID,
Descending
),
StartsWith(
List1Person.Email,
List2person.Email
)
)
},
AddColumns(
wList,
"SortField1",
CountRows(wList)
)
)
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.
Visit my blog Practical Power Apps
Hi @Kubo ,
Try this - StartsWith() is not case sensitive and is a good Delegable workaround
AddColumns(
SPlist1,
"SortField1",
CountRows(
Filter(
Sort(
SPlist2,
ID,
Descending
),
StartsWith(
List1Person.Email,
List2person.Email
)
)
)
)
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.
Visit my blog Practical Power Apps
Hi @WarrenBelz ,
Thank you for the reply.
That would be great workaround but for some reason I'm getting delegation warning on StartsWith this way:
"Part of this formula cannot be evaluated remotely. The 'StartsWith' function cannot be delegated if a field name appears in the second argument. Delegation warning. The "Filter" part of this formula might not work correctly on large data sets."
I have tried different way of writing the formula but cannot get rid of the warning.
Hi @Kubo ,
Neither AllColumns() nor CountRows() are Delegable anyway (they are 'hidden" Delegation limitations), so I am assuming that is the basis of the warning (although I have not seen that one before). StartsWith() is Delegable, but the returned result needs to be under your Delegation limit or CountRows will return a partial result.
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.
Visit my blog Practical Power Apps
Thanks again @WarrenBelz , I'm trying to pre-filter and sort data before delegation for CountRows hits. I will use workaround for now, I have saved email addresses as a plain text in SP list and I will use this to match the columns.
Hi @Kubo ,
If Delegation is your issue, you can try this
With(
{
wList:
Filter(
Sort(
SPlist2,
ID,
Descending
),
StartsWith(
List1Person.Email,
List2person.Email
)
)
},
AddColumns(
wList,
"SortField1",
CountRows(wList)
)
)
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.
Visit my blog Practical Power Apps
Hi @Kubo ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
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.
Visit my blog Practical Power Apps
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
189 | |
53 | |
51 | |
34 | |
33 |
User | Count |
---|---|
268 | |
92 | |
80 | |
68 | |
67 |