how to add the output of Matches activity in datatable ,
what should be datacolumn datatype
when i use this System.Collections.Generic.IEnumerable<System.Text.RegularExpressions.match> , column name comes as System.Linq.Enumerable+d__97`1[System.Text.RegularExpressions.Match]
when i use this System.Text.RegularExpressions.match, column name comes as System.Linq.Enumerable+d__97`1[System.Text.RegularExpressions.Match]
when i use list of <System.Text.RegularExpressions.match> it throws error as
it throws error Add Data Row: Type of value has a mismatch with column typeCouldn’t store <System.Linq.Enumerable+d__971[System.Text.RegularExpressions.Match]> in Date_List Column. Expected type is List1.
I tried to update in add data row
System.Text.RegularExpressions.MatchCollection
it throws error Add Data Row: Type of value has a mismatch with column typeCouldn’t store <System.Linq.Enumerable+d__971[System.Text.RegularExpressions.Match]> in Date_List Column. Expected type is List1.
it throws error , can i write linq without using for loop
like in this example i need to matchColl in column value
it should be {[abc],[def],[efg],[ghi]}
System.Text.RegularExpressions.Regex.Match(item “<ur regex pattern” ).Groups(“”).Value
I have tried this but this is not working
-------------------------------------------or in other words-------------------------------------------
i need to add the output of matches activities in add data row
so array row in add data row will be like
{
var1(string),
var2(string),
System.Text.RegularExpressions.Regex.Match(string, “”.Groups(“”).Value
}
and second thing is to find the multiple values
so even when two values it should consider multiple values .
like for example {[10.01.2021],[20.11.2021],[21.06.2021],[11.05.2021],[10.01.2021]}
so here we have one same [10.01.2021] but we have multiple value so i need to output to be True
it will false only when all the values are same .
use a matches activity and result will be stored in IEnumerable collection, then from there if matches activity gives only one output then try this code {resultOfmatches.First.Tostring} inside add data row ArrayRow property and send it to respective datatable
Or if the matches activity returns more than one result then use a for each activity of type IEnumerable collection type(System.Collections.Geberic.IEnumerable(UiPath.core.activites.matches) and add a add data row inside and add to datatable.