Link to home
Start Free TrialLog in
Avatar of STASBiz
STASBizFlag for Canada

asked on

sharepoint 2013, workflow and versioning

Hi,

SITUATION:
sharepoint 2013
a library with versioning major and minor activated
approval activated, but everyone can see draft

PROBLEM:
excel cannot see the sharepoint version

SOLUTION:
to be able to see the sharepoint document version in excel i created a column in my document type called "spversion"

then, a workflow "on creation" and "on change" update this spversion column with the actual version of the document

Workflow:
Définir spVersion à la valeur [%Élément en cours : Version%]
in english:
SET spversion to [actualelement:version]

PROBLEM:
by the time the workflow update my spversion column, the document was modified, then the version is changing, so my column spversion is obsolete the second after it was updated

so i decided to change a field before i copy the version to trigger the version update wich i tought would trigger only once in the workflow

but noooo, the version change at EVERY action the workflow do, so it changed twice and my spversion column was outdated again

if i compare the two column before doing the update action, it will be fine unless it's not the same value and the workflow start, wich will change the version just after i update my spversion column

Any ideas?

the only thing that come to my mind is to split the version in 2, then add one to the minor version part, then reunite it again, then put content in my column spversion. the version will be the same after version is also upgraded by one folowing the workflow action
(wich i dont know if i can do in sharepoint designer OOTB)

but even then, when a major version is published, the document will return to draft state because of the workflow
Wich is bad

I would prefer to turn off versionning and approval status update for all the workflow duration

or tell sharepoint that my spversion column is not part of any event about version or approval status
ASKER CERTIFIED SOLUTION
Avatar of Doug
Doug
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of STASBiz

ASKER

I am very comfortable with visual studio programming
I imported all my terms (managed metadata) with a console application with recursive sub on my sp 2013 server

I searched and searched for a inbox solution and found none :(

I checked a vm, and the creation for event receiver is there in visual studio as long as you install OfficeToolsForVS2012RTW (2013, v15)

I will now install visual studio and the office tools for vs2012 pack on the server



Thanks