I have a document library with about 30K files. I also have a list with about 5K rows. Both the list and the library have a DocNo column. I need to create a (site?) workflow where all documents in the library that have a corresponding record in the list (based on DocNo) will have a column X updated. So this is how far I got:
Unfortunately after updating 3 items it gives me an error. I believe this is because it is not finding a document with the specific DocNo in the library. I will try to comb the logs and confirm that. If this is the case how can I skip such items instead of crashing the workflow? Any chance I can test before if the item in the library has a matching item in the list? Thanks!
Solved! Go to Solution.
Definitely use "Log in History" to track the results of your "Query List" as well as each item that is being looped.Print out that "DocNo" value in your loop since it is the key of your "Update Item" action.
I am not sure what is the condition you have set in your Query List action. But you can use another Query List action in your For loop to check if the item exists before updating. But it will also slow down your for loop performance considering there are 30k files !
I would suggest you limit the number of results returned by Query List so you can debug what the issue is. This would reduce your dev time too
Hope this helps
Hi Igor Karon,
You could look at doing a Query list action on your document library and storing the DocNo in a separate collection variable. Then you could use a Collection operation to check the value exists before continuing:
You'd need to look at any performance implications though, Collection variable performance considerations