What is the expression for this?

To validate this condition what is the expression in if condition?
acerinox = acerinox And 386.289183 = 386.28

Hi @pravin_bindage ,

Can you explain more

Thanks!

CurrentRow(“Security name”).ToString.ToLower.Split(" “.ToCharArray)(0).Trim.ToLower.Contains(in_str_FileName.Trim.ToLower) And Math.Ceiling(Convert.ToDouble(CurrentRow(“Claimed tax”).ToString.Trim.Replace(”,“, “.”))) =Math.Ceiling(Convert.ToDouble(in_str_AmountFromPortal.Trim.Replace(”.“, “”).Replace(”,", “.”)))

I’m using this condition but its not working
1] CurrentRow(“Security name”).ToString.ToLower.Split(" “.ToCharArray)(0).Trim.ToLower → acerinox
2] in_str_FileName.Trim.ToLower → acerinox
3]Math.Ceiling(Convert.ToDouble(CurrentRow(“Claimed tax”).ToString.Trim.Replace(”,“, “.”))) → 386.289183
4] Math.Ceiling(Convert.ToDouble(in_str_AmountFromPortal.Trim.Replace(”.“, “”).Replace(”,", “.”))) → 386.28

think its not working because 386.289183 <> 386.28

386.289183 so how can i neglect numbers after .28

when i round this nnumber to two digit then LHS is not equal to RHS

Hi,

As Math.Ceiling method returns smallest integer greater than argument, both expression will return 387. And it doesn’t seem cause of not equal.

For now, can you try to output each item using WriteLine one by one? It might be clarify its cause.

Regards,

not much prefered, just for exploration purpose a cutoff on string base with regex:
grafik

 System.Text.RegularExpressions.Regex.Match("386.289183","[\d\,]+\.?\d{0,2}").Value
 "386.28"
 System.Text.RegularExpressions.Regex.Match("123386.289183","[\d\,]+\.?\d{0,2}").Value
 "123386.28"
 System.Text.RegularExpressions.Regex.Match("123,386.289183","[\d\,]+\.?\d{0,2}").Value
 "123,386.28"
 System.Text.RegularExpressions.Regex.Match("123,386","[\d\,]+\.?\d{0,2}").Value
 "123,386"
 System.Text.RegularExpressions.Regex.Match("123,386.1","[\d\,]+\.?\d{0,2}").Value
 "123,386.1"
 System.Text.RegularExpressions.Regex.Match("123,386.12","[\d\,]+\.?\d{0,2}").Value
 "123,386.12"
 System.Text.RegularExpressions.Regex.Match("123,386.123","[\d\,]+\.?\d{0,2}").Value
 "123,386.12"

yes i’m using it, but i also not understanding how it move to next row

Hi,

Can you try to output the following 2 expressions and check if the output is 97,99,101,114,105,110,111,120 ?

String.Join(",",CurrentRow("Security name").ToString.ToLower.Split(" ".ToCharArray)(0).Trim.ToLower.Select(Function(c) AscW(c)))

String.Join(",",in_str_FileName.Trim.ToLower.Select(Function(c) AscW(c)))

Regards,

@pravin_bindage

Use if condition activity & use this condition as acerinox.ToString.Lower = acerinox And 386.289183 = 386.28 , try this It will work

Thanks
Varun

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.