IF conditon with amount wont work

@Doktorgud, looks good to me. Are you getting any error? Just try to Run the workflow instead of Debug.

No error, the bot just goes by without doing anything.

Tried to run it, got this:


Source: If

Message: Input string was not in a correct format.

Exception Type: System.FormatException

RemoteException wrapping System.FormatException: Input string was not in a correct format.
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Convert.ToDouble(String value)
at lambda_method(Closure , ActivityContext )
at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity) at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath)
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

@Doktorgud, can you please use Write Line activity to print output after Assign Activity and share result?

I tried this, and it works, (did substring 0,04) but if the amount is 608,00 and i remove , then the amount becomes 6080 and that means higher then 1500.

is it something wrong here? im gonna try write line…

@Doktorgud, value should not contains blank space while converting into double. That’s the reason I ask you to Replace " " with “” using Assign activity.

“3 902,40”

1 Like

1 Like

Did like this and now the flow works, thanks a million!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.