cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Document Management

Hello,

I am in the process of building a flow for managing document policies in the business,
The trigger should send an email to the Document Owner when the modified date is = to 365 days, the issue I'm also having is that some of the Document Owners are empty so I don't want the workflow to trigger or another option is send an email to an administrator to manage getting these documents updated.

 

I would appreciate any improvements / suggestions as to what I have already built so far, see below:

 

Doc Management_1.JPGDoc Management_2.JPGDoc Management_3.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Document Management

 

Hi @ClaireAllen ,

 

If the type of Document Owner field is Person(not allow multiple selections), you could use null to check if this field is empty.

Flow configuration:

117.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Highlighted
Super User
Super User

Re: Document Management

@ClaireAllen 

Hi there.  A couple of options:

 

  • First, you can maybe add a condition or something that checks if the owner field is empty or null.  If it isn't, then proceed as you would and if it is blank, send a different email to the admin.
  • Another option would be to use the coalesce() function in your "To" field of the email.  This basically cycles through your information until it hits a non-null value.  The expression might look like:  coalesce(<DocumentOwnerDynamicValue>, 'admin@company.com')  - That way, if the doc owner is null, it just sends the same email to the admin.

There are probably some other ways to handle this, but that's what I've got 🙂

 

Keep us posted.

-Ed

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Highlighted
Dual Super User
Dual Super User

Re: Document Management

Hi!

My suggestion is:

1.-hover the mouse over the "Document Ow..." dynamic content currently assigned to 'Send an email' 'To' input.

Write down the text displayed. It should be something similar to:

items('Epply_to_each')?['Document...

You can add a Condition action block inside your apply to each, then:

-assign the following expression on the left side of your condition rule:

empty(<the text displayed when hovering the mouse here>)

-assign the following expression on the right side of your condition rule:

true

Now your flow execution will take the 'true' (Yes) branch if your current iteration column was empty, whereas will take the 'false¡ (No) brach when the column was not empty

 

Please take a try, if your new flow design still fails, please share a screenshot for further support

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Community Support
Community Support

Re: Document Management

 

Hi @ClaireAllen ,

 

If the type of Document Owner field is Person(not allow multiple selections), you could use null to check if this field is empty.

Flow configuration:

117.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper II
Helper II

Re: Document Management

Hello,

I have tried this method first,

 

I've added the condition, and test the workflow and all seems to run okay,

 

I'm now not sure about the Get Past Time & Get Files (properties only)

Doc Management - Get Files.JPG

The filter query is as follows

formatDateTime.png

 

So my understanding is that this would get the documents based on 12 months (past time)

 

I have also removed the Get Files that I had in the apply to each and now only have the condition as mentioned to add.

 

My aim is to get documents when the modified is 1 year to send an email to the document owner to review the document.

 

Regards

Claire

 

Highlighted
Dual Super User
Dual Super User

Re: Document Management

Hi again!

 

So with the approach you just described, 'Get files -properties only-' output includes only documents modified 12 months ago, according to your requirements, right?

If so, you still have a problem if any of them do not have 'Document owner'. So you probably need to add an Apply to each' action block,   assign as its input 'Get files -properties only-' output, then implement a Condition inside to get rid of Files without 'Document owner'. Several approaches proposed in this same thread from both @edgonzales @v-bacao-msft and me. On the proper branch of the condition add the 'Send an email'.

Please let us know your progress

Thanx!

 

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Community Support
Community Support

Re: Document Management

 

Hi @ClaireAllen ,

 

Please try to change "eq" in Filter Query to "le".

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper II
Helper II

Re: Document Management

Thank you @v-bacao-msft ,

 

I will give it a try and see what happens.

 

Highlighted
Helper II
Helper II

Re: Document Management

Hello @v-bacao-msft ,

 

I've changed the eq to le,

 

the only thing at the moment, is that the workflow is running but I don't feel it's working how it should be,

 

The workflow has only identified one file

Last modified Dec 2018, but there are at least 100 documents that have not been modified for over a year.

The Document Owner equal null is working, but now I can't seem to get the correct date information

Any suggestions?

 

Thank you

Claire

 

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (7,649)