Solved

Querying 1 item library

  • 30 October 2017
  • 1 reply
  • 4 views

Badge +7

Hi,

 

I am querying library with 1 item and storing in to a 'IDCollection'. Then using for-each to run through the IDCollection (1 item and getting it's document ID)

 

On for-each loop, I am doing 'For each IDcollection', out put to 'IDVar'

When I reach the for-each loop, my workflow is crashing with the following error. (The workflow is going in to the for-each then outputting a blank line as the IDVar) I am assuming the 1-item is the culprit. How can I overcome this? Any help is appreciated!

 

I tried changing gathering Document ID in to IDs...did not help either

 

RequestorId: 3f28b335-838a-7221-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentNullException: Value cannot be null. Parameter name: String at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at Microsoft.Activities.Expressions.ParseNumber`1.Execute(CodeActivityContext context) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity ParseNumber<Int32> FormatString DynamicActivity<Guid> ChildActivityStep Sequence ForEachKeyValuePairStep ForEachSequence If DynamicValue Is Not Empty And Number of Items Greater Than 0 For Each ChildActivityStep Sequence ForEachKeyValuePairStep ForEachSequence If DynamicValue Is Not Empty And Number of Items Greater Than 0 For Each Branch Parallel Block Sequence

icon

Best answer by kchaluvadi 30 October 2017, 20:23

View original

1 reply

Userlevel 3
Badge +12

Hi,

Is your query returning that one item into IDCollection variable?

Form error message it looks, the IDCollection is empty, try to log the count of items in that collection?

Use "Collection Operation" action, pass "IDCollection" into it and select "Count". See if it returns 0 or 1.

Reply