Get field from list to use in library workflow

  • 8 February 2017
  • 5 replies
  • 0 views

Badge +8

Good day everyone,

I have kind of a convoluted problem.  I have a list [list A] which has an approver field in it that has a bunch of workflows running on it. Then I have a document library [lib B] that needs to get the approver from the list [list A] to use in a workflow.  Any ideas on how to accomplish that?


Thanks,
Jennifer


5 replies

Userlevel 4
Badge +12

Hi Jennifer,

you could query the other list to get the approvers but how are both lists related to each other?

By what condition does the document library list workflow determine the correct approver from list a?

Kind regards,

Enrico

Badge +8

There is actually a second list that has approvers in it, so listA chooses the approver from listB, and the document library needs to get the chosen approver from listA.

Thanks for the reply.  I will try and query the list.
Jennifer

Userlevel 4
Badge +12

I'm not really sure if I understood your scenario but would this work?

- You create an item in list A that queries approvers from list b

- the workflow starts after the item is created and updates documents in the document library with the chosen approvers

- annother workflow on the document library runs after the item was updated and approvers were saved (conditional start)

What I don't understand is how you know which documents in the library need to be approved by selecting your approver.

Kind regards,

Enrico

Badge +8

That is the problem I am running into now with trying to query the list, how to filter it.  I have a folder that the documents are contained in that has an ID on it which matches the list item ID, but I am not sure how to traverse to it.


For example:
12-Folder1   <--- need to get the id from the folder
  -document1.docx

  -document2.docx


Any suggestions?
Thanks,
Jennifer

Badge +8

I believe I can use the get itemURL and then use a regular expression to pull out the folder id.

Thoughts?

Thanks,
Jennifer

Reply