cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RAM05
Level: Powered On

Document Checked-in or Checked-out condition True or False

Hi everyone,

I have exhausted all avenues, so would be very grateful for your help. I am new to Flow, so please excuse me if I sound ignorant. So far I have progressed with the information I have found on forums, so thank you.

I am wanting to check whether a file is checked-in or out, and based on the answer check it in or out accordingly. If it is checked-in, then check it out and vice versa. It's a development stage for me to understand how this works.

I have managed to get as far as testing whether the file is Checked-in or Checked-out and the condition returns  the correct answer. I have set up flow to email me the result of the condition, but the condition doesn't follow the appropriate branch.

So to test it I have a file which is checked-out to me in SP. Confirmed.

Flow.JPG

When I test the flow it send me the email (Send an email 3) confirming the file is Checked-out 

Send an email 3.JPG

 

email.JPGEmail received

The flow from the condition 5 is as follows

Condition 5.JPG

 

Now when I test this flow I expect the result of the condition will mean the 'Yes' branch will be followed, because the file is already checked-out, so I want it to be Checked-in. But I receive an error and find the test has gone down the 'No' branch. Inspecting the results of the test the error occurs in the Send an HTTP request to Check-out document step, it states the file is already checked-out. 

Error.JPG

So I seem to be missing something here. I have tested the IsCheckedOut property, which determined it is. I don't understand why the condition is failing as it is also interrogating the same.

 

Interestingly, I changed the condition from "is equal to" to "is not equal to" and the flow worked. This defies logic to me, but I must be not considering something because the file is checked out.  Condition 5.1.JPG

Resulting flow test

Flow 1.JPG

But it only works once, now the file is Checked-in and I try running it again. The file is confirmed Checked-in in the email, but the condition goes down the 'Yes' branch and then gives me an error "the file is already checked-in". I expected it to go down teh 'No' branch. 

 

Any assistance will be greatly appreciated. Apologies this is so long, but I really wanted to make sure I was articulating the problem properly. 

Kind regards,

Russel

2 REPLIES 2
Super User
Super User

Re: Document Checked-in or Checked-out condition True or False

Hi @RAM05 

From the screenshots it looks like the condition is using the output from the Compose action. Are you able to share what this Compose action is doing? If you view the output of this Compose action in a previous Flow run does it display the value you are expecting to see?

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


RAM05
Level: Powered On

Re: Document Checked-in or Checked-out condition True or False

Hi @LeeHarris thank you for your reply.

The compose was something I only added a day or so ago after reviewing another persons post, but it didn't change the result I received. With or wothout the compose action it acts the same. Thank you for your consideration.

Compose.JPG

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users Online
Currently online: 289 members 6,008 guests
Please welcome our newest community members: