I was extracting data from web in string format
Like - date and price
I want to get the highest price value. Please help me with the logic or solution.
Build Price_Table containing Amount as column name
At first you need to get Price value from the string by using regex: $\d*$
once you get price value from the string, add that to the Price_Table one by one using add data row.
then use below code:
Max_Value = Price_Table.AsEnumerable().Max(Function(row) cint(row(“Amount”)))
Mark it as solution if it solves your issue.
Hii @Rishik_Chowdary ,
Assuming that your input will be in array or in list.
- Use for each activity to iterate through each values.
- Inside the body Split the currentitem to get the price value that is Split(currentItem,“$”)(1)
- Use append to list activity . it will add all your price values into a list
- Then (Outside the for each activity) using assign activity get the max value by providing,
MaxValue = NewlistVariable.Max
I have dropped a sample xaml for your reference Sequence.zip (1.7 KB)
How about this expression?
Hi @Rishik_Chowdary ,
Could you also let us know what is the format of data that you have or prepared ? Is it in a String format ? Array of String ? Or Datatable ?
More details would be helpful for us to suggest appropriate solution.