I need to screenscrape a document and then get numbers connected to a given name. I have crated tha document into a table and try to get it by using a If activity.
I can’t get the value, it returns empty. The value looks like this: VALUE 1234567
I’m not sure exactly, but I noticed you used a Wildcard *
You can’t use Wildcards in conditions like that. You can, however, use .Contains or .StartWith or Regex, or many other methods.
I would recommend something like this in the condition field:
rowItem.ToUpper.Contains(“VALUE”)
or
rowItem.ToUpper.StartsWith(“VALUE”)
If it’s more dynamic you might need Regex but your condition seems simple enough.
Sorry about that. Yeah .StartWith
When you type the period (.) it should list all the functions that you can use with your string. Hope that helps further.
Assuming this is consistent you can simply just .Split the string and pull the 2nd element or remove the string “VALUE”
rowItem.ToString.Split(" “c)(1)
or
rowItem.ToString.Split({” “},System.StringSplitOptions.RemoveEmptyEntries)(1)
or
rowItem.ToString.Replace(“VALUE”,”").Trim
You can also use a Regex Pattern
System.Text.RegularExpressions.Regex.Replace(rowItem.ToString,“[a-zA-Z]”,“”).Trim
or
System.Text.RegularExpressions.Regex.Match(rowItem.ToString,“[0-9]{1,10}”).Value