I have to insert the given numbers into application where I have only 3 options in drop down 0-10, 10-25, 25+ . I have no issue when I get number as it is in drop down, But I am facing error when I get values like 9 , 14 , 28+, 40 . Can someone help in converting the given numbers into 0-10 , 10-25, 25+

First Get the only numbers as below

Later you can keep a if condition to check whether the number is in the range of the drop down options

For your understanding I placed the message boxes, you can replace that with your select option

Hope this helps you

Thanks

@Naresh_Mandava

if numbers with a + are to check e.g. 59+ we ave to parse eg. with regex \d+ and to convert e.g. Convert.toInt32(…

For getting some flexibility we can work with a switch activity.

Variables:

So we define the segments within the cases similar to the defition of the arrNumbers.

`arrRange.Where(Function (x) iNumber >= x ).Max()`

calculates for us the relevant case

Output of a test sequence:

find starter help here:

IntNo_SegmentSwitchMapper.xaml (8.8 KB)

Thanks for the help @ppr , This is working only when I get numbers but when I get input as 25+ or 10-25 this is not working.

Yes that is correct as it is string. It was mentioneded here:

@ksrinu070184 thanks for the help, Getting only numbers is creating new problem when i have value as 10-25

parsing the string into a number can be done by regex \d+

identifying the additional modifiers e.g. 33+ we can work with groups:

similar we can check for ranges.

Afterwards we would implement e.g. with a switch on how and what info we want to retrieve from the string for the number parsing / conversion