cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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 receivedEmail 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
Highlighted
Super User
Super User

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!


Follow me on Twitter at @QG_LeeJHarris

Or on LinkedIn at in/leejharris

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (7,238)