<ultra Urgent>Can anybody help in making it variable?

ExtractDataTable.AsEnumerable.Count(Function(r) r(“Status”).ToString=“Canceled”)/ExtractDataTable.Rows.Count>0.6

Where Canceled and 0.6
I want to take from Config file with argument in_Config.

ExtractDataTable.AsEnumerable.Count(Function(r) r(“Status”).ToString=“”+in_Config(“ConditionStatus”).tostring+“”)/ExtractDataTable.Rows.Count>0.6

HI @anjasing

Can you elaborate your query

Do you have an issue with expression

ExtractDataTable.AsEnumerable.Count(Function(r) r(“Status”).ToString=in_Config(“ConditionStatus”).tostring)/ExtractDataTable.Rows.Count>0.6

Regards
Gokul

1 Like

I want 0.6 and canceled written in query to be a avraible
variable…taking from config file

the count operator suffers within VB on some part Limitations

Check if the LINQ can be rewritten to:

ExtractDataTable.AsEnumerable.Where(Function(r) r("Status").ToString.Trim().Equals(in_Config("ConditionStatus").tostring.Trim)).Count / ExtractDataTable.Rows.Count > 0.6

However

looks like a quote issue

can u help me making it variable for two things;
canceled
0.6

when canceled is the variable from the config then it is incorpoarated within the LINQ
depending on the details you can check if it is needed to make it more defensive: contains, toUpper harmonization

0.6 just use a variable instead of the harcoded value.

Otherwise expose more details if you need more help

1 Like

ExtractDataTable.AsEnumerable.Count(Function(r) r(“Status”).ToString=“Canceled”)/ExtractDataTable.Rows.Count>0.6

In above expression i want Canceled and 0.6 as variable I am taking from config file. if u can help

sure you are in hurry but kindly note we already did it or maybe you missed out to tell us some details

Have a look here:
grafik

1 Like

It’s done. Thank you so much :slight_smile:

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