I need to use WF to build a shadow library containing logical links to all documents in a given document library. (New document in /Documents --> create link to document in /Links).
The /Links library has only one Content type active, which is based on the Link to a Document -content type.
Using the basic SP 2013 WF action “Create item in …” I get a file, but the .aspx file generated is blank!
My hopes went up when I discovered your new action pack.
But I can not get it to work here either. Tried
Using the “Create item in list …” action.
It returns an error message saying: Exception: To add an item to a document library, use SPFileCollection.Add().
Using the “Copy document from …” action
It creates a file, but it is also blank (the .aspx content for logical links is not generated).
I also can not find a way to enter the specific metadata required by the link content type.
Appreciate tips on how to approach this challenge.
Sorry for delay with answer. I wanted to ensure that the solution will work.
At screenshot below you can see the full workflow.
The workflow copies template aspx file (in attachment to this message) from Assets library to document library and changes the attributes: URL and ContentType.
Also if the solution above don’t satisfy you. We can add a new workflow action “CreateTextFile”, if you’re interested please write to sales@plumsail.com for request the price.
Thanks for your response, and the suggested solution.
I have rebuild it but can not get the CAML query to return any data.
Here is my version of your query:
The WF action setup looks like this:
Folder URL: /Scanship/Production
CountItems: Variable: count
List URL: Links
Caml Query (as above)
Items: Variable: Items (=dictionary)
Logging content of variable: count returns:
02.01.2015 10:08 Comment Item: [] - 0
… and nothing is inserted into variable ItemID.
Any idea what I do wrong?
Thanks
NB!
I have also tried various other CAML queries, f ex inserting a given key into the Title field, and querying for this. But same - or no results on this either.
Ex:
Same result. No Items found by CAML, and WF hangs in step “Update Link URL” (must be manually terminated).
Do I need to reinstall the Action pack to pick up the changes?
I believe I have not installed the latest SW update you released to the action pack.
Can this have an impact?
Thing to remember is that WF variable CurrentItem:Name does not include file suffix (here: .aspx)
AND
Trying to print values from a dictionary variable using the Log action results in the WF stopping execution.
You guys build really useful features and provide excellent help and support.
Thanks!
Geir