I'm completely stumped on how to create an error message. First off, this is working correctly with no errors. I am running a flow on a List Item, and then I'm finding a single Doc Library File that matches that List Item Title, and then pulling the file properties for only that particular file. Next I use the Value from the Doc Library File Properties in an apply to each to pull the ID for the Library File with the name that matches my List Item, and use that ID to update that files properties in that separate Doc Library. Success.
Okay. So where I'm stumped is that if there is NOT a FileLeafReq in the Document Library with a name IDENTICAL to my List Item Title, I want to generate an error email and cancel the entire flow. But when this is the case, the Get Files action just doesn't return anything at all. It doesn't fail or skip. So my value apply to each containers do run, but ignore anything inside since no file properties were returned. I cannot figure out how to code <If Get files (properties only) Filter Query FileLeafReq ne 'Title.xlsm' then cancel my flow, don't run any other actions, and send an error message email.> I have tried to use the Configure Run After, but it doesn't count anything as skipped or failed because it DOES run the apply to each container. Help?
(Below are screen shots of what happens when there is no FileLeafReq in the Doc Library to match the item Title in the List)
Solved! Go to Solution.
To send an email when no items are returned, see my example below:
To send an email when no items are returned, see my example below:
Victory! Worked perfectly, TYVM. I use variables but only when I have an exact example of how to code them, and this is my first time creating flows from Lists and Attachments instead of Libraries so the learning curve has been a bit steep on this one.
User | Count |
---|---|
93 | |
45 | |
19 | |
19 | |
15 |
User | Count |
---|---|
137 | |
54 | |
42 | |
42 | |
30 |