cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Using version number for flow condition

I have a communications site with a pages library. I want to announce the publication of a new page on Yammer. I first tried to look for a trigger condition for something being published, however only create and modified are available. So instead I thought of using the version number, so trigger when version is 1.0.

 

@equals(triggerBody()?['Version'], 1.0)

 

however even with a page having a version of 1.0, the condition fails. I tried the equality condition with and without single brackets.

7 REPLIES 7
Highlighted
Community Support
Community Support

Re: Using version number for flow condition

Hi AdamFlint,

 

I would like to know how is your flow configured. Could you show me a screenshot for your flow?


Per my certain knowledge, we are currently not possible to get the version history of a file that is saved in a library. There is no dynamic content can be used for it.


Have you created a custom column for the version number in the library?

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable

Re: Using version number for flow condition

flow-1.png

 

Hi - this is my flow condition. I have tried Version, _UIVersion and _UIVersionString, none of these work. I know this because I have a Yes and No beneath this and the "No" is always triggered when a page is published and the version set to 1.0. I have also tried the condition as '1.0.'and 1.0.

 

The full story is that I have a SPO Communications Site and our publishing team want to socialise a newly published message on Yammer. As there is no trigger condition for when a SharePoint page is published, only created, I wanted to use the trigger for when the version is set to 1.0. I could create a custom column to mimic the version number, however this is a bad UX as it means that every time something is published for the first time the publisher must remember to make something live.

Highlighted
Community Support
Community Support

Re: Using version number for flow condition

Hi AdamFlint,

 

Is the “version” column a custom column? When using the trigger “When an item is created or modified”, we don’t have a dynamic content for version.

 

What do you mean by “As there is no trigger condition for when a SharePoint page is published”. It seems that there is no action for “When a page is published”. I am not sure which action are you using at here?


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable

Re: Using version number for flow condition

Version is the inbuilt version numbering column that is part of the document list. There is no action for when a SharePoint page is published, you are right, that is the point that I am making. So what I am trying to do is trigger flow when an item is modified AND it's version becomes 1.0. This is equivalent to publishing a page.

Highlighted
Frequent Visitor

Re: Using version number for flow condition

I have the same issue, is there a solution?

Highlighted
New Member

Re: Using version number for flow condition

I had to convert the Condition for VersionNumber to String for to compare it correctly.  Otherwise it looks like the condition converts 1.0 to 1 and everything will evaluate as false.

 

Since the initial post it looks like they added VersionNumber as an attribute for SharePoint dynamic content so I created a Condition Control that states Version Number is equal to string('1.0').  When I just entered 1.0 to the textbox it would change to a 1 after save and reopen, causing the condition to evaluate as False (VersionNumber is stored as a string).

 

Condition Control.png

Highlighted
New Member

Re: Using version number for flow condition

You are the man!

 

I had the exact same problem.

I was annoyed that Flow does not provide details of the values it was comparing.

 

Good catch!

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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 (4,016)