Answered

From String to Integer

Hello,

How to get from String to Integer?

The business scenario is that an external party sends a data file periodically. The format of a certain field is string. For example, 2017_01 (year 2017, month of January, ). Every time this data is received a collection item is added to a collection in Bizagi. In this collection I need to perform certain calculation. Thus, there is a need to set the data 2017_17 (string) into another attribute 201701 (integer). So I need rule that takes away the "_" and reads 201701 as integer and not string format.

Is this possible within Bizagi? If so, do you have an example?

Best regards,

Justin

Comments (1)

photo
1

Dear Justin,

Once you have a string like: 201701, it is very easy to pass it to number. Just assign it using Xpath. Example:

  1. <Test.Value3>=<Test.Value1>;

Where Value3 is a float value and Value1 is a string value.

To Split the main value, you need to follow this example (using the function String.Split("ValueToSplit"):

abd9de217e4511a8e6140420c8716570

Regards