Multiplication based on certain conditions

Hello Everyone,

I am new to using this UIPath software and my first post to the community for help!

I am trying to automate a scenario where I need to multiply a column based on certain conditions.

For example, these are the conditions I need to check:

If the current value < 2000 multiply by 5
else if the current value >= 2000 multiply by 6
else if the current value > = 3000 multiply by 7
else if the current value >=4000 multiply by8
else if the current value >=5000 multiply by 9

Can anyone suggest a better solution to automate this scenario?

I am grateful to you!

Best Regards,
Iram Arshad

Hi,

Can you try the following?

arrInt ={2000,3000,4000,5000}
result = cuurentValue*(5+arrInt.Count(Function(i) cuurentValue>=i))

or
result = someValue*(5+arrInt.Count(Function(i) cuurentValue>=i))

Regards,

I am trying to following your code but from where this “i” comes?

Hi,

i is anonymous argument of Linq expression.

The following document might help you.

Regards,