Hey all,
I have hit a bit of a wall. I have a variable that is a data table and I need to count how many times the word “week” appears in it. What is a proper expression for this?
Thanks!
Hey all,
I have hit a bit of a wall. I have a variable that is a data table and I need to count how many times the word “week” appears in it. What is a proper expression for this?
Thanks!
Welcome to the uipath community.
If it is in one particular column then you can try below expression.
Int Count = varDT.Select("[ColumnName] = 'word' ").CopyToDataTable.Rows.count
If you are searching that word in entire Datatable then try this.
Use Output Datatable activity to convert Datatable into string and say ‘varStr’
And then try below expression.
Int Count = varStr.Split("word"c).Length - 1
Hi How about per row? I need to get the least row a word appear
may we ask you to open a new ticket along with sample data and expected output? So we can address it more individually.
The origin topic has some open interpretations and maybe different approaches are matching as well