Hello,
I'm trying to build a flux which will update a power BI dataset when a specific excel file (named "labellisation.xlsx") is modified in my one drive
The Trigger I added is "when a file is modified" from One Drive. I selected the correct folder and now when I modified any file in it my power BI is updated
Now I want to add a condition so the trigger works only if its "labellisation.xlsx" that is modified
I try using the same condition as the one I use when I use the "When an item or a file is modified" trigger from sharepoint : @contains(triggerOutputs()?['body/{FilenameWithExtension}'], 'labellisation')
But this condition does not work. I guess the condition syntax is not the same for a one drive trigger and a sharepoint trigger but I couldn't find the correct one
It works with
@equals(base64tostring(triggerOutputs()?['headers/x-ms-file-name-encoded']), 'Labellisation.xlsx')
So my problem is solved, thanks for your help
But not with (error message : One or more fields provided is of type 'Null', a different type is expected.)
@contains(base64tostring(triggerOutputs()?['headers/x-ms-file-name-encoded']), 'Labellisation')
Hi,
Please try this
You can do either of this
@contains(base64tostring(triggerOutputs()?['headers/x-ms-file-name-encoded']), 'labellisation')
@equals(base64tostring(triggerOutputs()?['headers/x-ms-file-name-encoded']), 'labellisation.xlsx')
Please note if you try to "test" it manually it will fail and say your have a null string which is true because there was no passed in filename yet.
So save it, then make a change and then look in the history to validate.
Cheers
If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2