Skip to main content

Hello,

 

I have workflow that suspends when a field (Current Kms) in a list item is blank or 0.  Workflow completes where there is a number >0 in that field.

 

Suspend information:

RequestorId: 15e7635c-a11d-b9bd-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.FormatException: Input string was not in a correct format. at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) 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<Double> Cast<Double,Object> BuildDictionary<String,Object> Subroutine<Guid> Sequence If vartxtCreateItem = Yes (using IF so can collapse process) Sequence Microsoft.SharePoint.WorkflowServices.Activities.LoopNTimes Sequence If reporting item not created Sequence Flowchart Create RV Reporting Item.WorkflowXaml_d4539824_1878_4b19_8a17_98f7fd9b227c

 

A little more info about the workflow:

The workflow parses data in a repeating section, then gets that data and creates an item in a new list.  That is where the workflow is suspending - Create List Item.

 

Any thoughts would be very much appreciated.


Cheers!

Lisa

 

Hi Lisa,

What is the field type of the column 'Current Kms' in the SharePoint list? Is it 'Number'?

Thanks,

Callum


Hi Callum,

The field type of the column 'Current KMs' is a single line of text.  Attached is a screenshot of a workflow history. In this example the workflow created a new item in the list for the first repeating section where teh Current KMs is 50, however, it suspended when it tried to create the second item where the current KMs is 0. 

28/08/2018 1:48 p.m.Comment
No presence informationCompass
Create RV Reporting Item started
28/08/2018 1:49 p.m.Comment
No presence informationCompass
Current KMS Collection: n"50","0"]
28/08/2018 1:53 p.m.Comment
No presence informationCompass
got RV data
28/08/2018 1:53 p.m.Comment
No presence informationCompass
total RV quote nos:  2
28/08/2018 1:53 p.m.Comment
No presence informationCompass
Term: KMs:Discount: CCRating:
28/08/2018 1:53 p.m.Comment
No presence informationCompass
varNumRVIndex = 0
28/08/2018 1:53 p.m.Comment
No presence informationCompass
Get details for vehicle no: 0
28/08/2018 1:53 p.m.Comment
No presence informationCompass
Current KM txt50
28/08/2018 1:53 p.m.Comment
No presence informationCompass
Quote No Reported:  RV2097-1
28/08/2018 1:53 p.m.Comment
No presence informationCompass
varNumRVIndex = 1
28/08/2018 1:53 p.m.Comment
No presence informationCompass
Get details for vehicle no: 1
28/08/2018 1:53 p.m.Comment
No presence informationCompass
Current KM txt0


Thank you for your time and help. It is much appreciated.


Regards,

Lisa


Hi Lisa - sometimes numerical comparisons with text fields don't work. The problem here is maybe that 0 just becomes blank; and not zero. You might want to filter this out by comparing with another text field. What I often do is create a workflow text variable called 'nullvalue', and leave it blank. I then use it to compare with blank text columns.


Reply