mavsp8
(mavs)
December 1, 2022, 4:29pm
1
NewValue OldValue
60.50 55.50
53.50 56.50
I have created loop and stored values in 2 different variables
Variable 1 = NewValue
Variable 2 = OldValue
If value of NewValue = 60.50 and OldValue = 55.50
keep value of variable NewValue = 60.50
If value of NewValue = 53.50 and OldValue = 56.50
keep value of variable NewValue = 56.50
logic in Excel is shown below
I need help in executing this logic in Uipath by assigning values into variable and try to find max value and at the end i will display result in message box
ppr
(Peter Preuss)
December 1, 2022, 4:34pm
2
is it possible to bring it within a general rule like e.g catch the max value from New/OldValue?
ppr
(Peter Preuss)
December 1, 2022, 4:47pm
4
may we ask you to answer the question. Once we cleared the requirement / evaluation rule then we will look for the matching solution approach. Thanks
mavsp8
(mavs)
December 1, 2022, 4:56pm
5
Yes, I need to find max value from both variables(NewValue and OldValue) and store output in another variable called “Result”
ppr
(Peter Preuss)
December 1, 2022, 5:09pm
6
when variable type (New/OldValue) is Double:
Assign Activity:
myMaxNumber | Double =
{Variable1,Variable2}.Max()
When variable type is String / coming from datatable:
We will convert into a double
Assign Activity:
myMaxNumber | Double =
{CDbl(Variable1),CDbl(Variable2)}.Max()
Datatable origins / row is current looped row e.g. for each row
Assign Activity:
myMaxNumber | Double =
{CDbl(row(“NewValue”).toString.Trim,CDbl(row(“OldValue”).toString.Trim}.Max()
system
(system)
Closed
December 4, 2022, 5:22pm
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.