Hi everyone!
I'm building a Powerapps that collects information from an excel file using a key (National ID) to collect all rows refering to a particular person.
Usually we get 20~40 rows per person on the collection.
Here's the on select from the collect button:
ClearCollect(col_BolxCPF,Filter(Table1;CPF=t_CPF.Text))
Now, I want to remove some items on the "col_BolxCPF" collection using mutiple "RemoveIF"; all of them works wonderfully except for thisone:
RemoveIf(col_BolxCPF,Status="Expired",CountIf(col_BolxCPF,Message = ThisRecord.Message,Status="Paid")>0);
It's ment to remove all tickets that have expired, and has ben paid on another ticket with the same Message.
The issue here seems to be that "ThisRecord.Message" is referencing the record on the CountIF instead of the record on the RemoveIF.
On the CountIf, when I reference "Message" im sure it's referencing the CountIf's source.
I thought that using "ThisRecord." wold reference the RemoveIf item being checked. But it doesn't. It references the CountIf Item all the same. And then
Message = ThisRecord.Message
is allways true.
Does anyone know, how can I reference the "RemoveIf" item inside the "CountIf" item?
Does anyone know a better (or at least functioning) way to solve this?
Solved! Go to Solution.
Hello @pygesteima,
You could try the following:
RemoveIf(col_BolxCPF As BolxCPF,Status="Expired",CountIf(col_BolxCPF,Message = BolxCPF.Message,Status="Paid")>0);
Let me know if this helps!
Hello @pygesteima,
You could try the following:
RemoveIf(col_BolxCPF As BolxCPF,Status="Expired",CountIf(col_BolxCPF,Message = BolxCPF.Message,Status="Paid")>0);
Let me know if this helps!
Exactly what I was looking for!
Just added the "BolxCPF" reference at "status" too, like this:
RemoveIf(col_BolxCPF As BolxCPF,BolxCPF.Status="Expired",CountIf(col_BolxCPF,Message = BolxCPF.Message,Status="Paid")>0);
Thank you very much! ❤️
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 |
---|---|
195 | |
45 | |
45 | |
44 | |
35 |
User | Count |
---|---|
277 | |
81 | |
81 | |
74 | |
69 |