Hi, my question is very simple, but I could not find anything helpful. I would like to patch the last record that has a blank field in my CDS entity. The scenario is this: I have several records with the same value in a field (let's say fieldA) and I want to write to an another field (fieldB) only on the most recent one. Consider that the field I mentioned are all the equals, what changes is the creation date. How can I achieve that? The Last function is not delegable, so it doesn't always do what I want (almost never).
Hi @mark6
Patch(DataSource, First(Sort(Filter(DataSource, Field1 = "<<ValueToMatch>>"),'Modified On',Descending)),{Field2:"<<valueToUpdate>>"})
Hi yashag2255,
thanks for your answer. I tried your formula but the behaviour is always the same. The strange thing is that on my computer it does work, but when I execute on my device (Samsung tablet) it doesn't work. In particular it patches another record, the first one, not the latest. I cannot figurate why. I inserted a Refresh(entity) before the operation but the problem still remains. Any other suggestion?
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
14 | |
4 | |
4 | |
3 | |
3 |
User | Count |
---|---|
22 | |
6 | |
6 | |
5 | |
4 |