First up, it is really really frustrating that you can't refer to the standard Name column in a Calculated type column!! Bizarre. So I'm now having to jump through hoops to create a secondary column, let's say `Name Tracker`, and create a flow which triggers off any change to the Name, and updating `Name Tracker` with the new value... just to keep a duplicate copy of Name that I can actually use in my Calculated column!
I'm using the "When a file is created or modified (properties only)" trigger, and updating `Name Tracker` with the latest version of `Name`... but am really struggling to prevent an infinite loop. I've tried looking for changed properties (after trigger) but that isn't working. Plus, I'd rather not trigger and then abort... I'd rather not trigger at all... hence my preference is to use a trigger condition.
So I created another custom column `PrevName`, and in the trigger condition I'm trying:
@Anonymous(equals(triggerBody()?['Name'], triggerBody()?['PrevName']))
And then if it proceeds, I set PrevName to Name, so that it shouldn't trigger next time (unless Name has changed).
But this doesn't seem to work... it just keeps re-triggering over and over.
This is really like pulling teeth... all to solve a problem that shouldn't be a problem in the first place!
UPDATE sometimes it doesn't seem to trigger at all... except when I save the flow... I can't understand why saving a flow (not making any changes to the file itself) would trigger anything?!


Report
All responses (
Answers (