How to find a partial match from output_value and match it to value in a dt_datatable then use the partial match found to add row
output_value = "12345600"
dt_datatable = {"123456", "263456"}
Thank you in advance.
How to find a partial match from output_value and match it to value in a dt_datatable then use the partial match found to add row
output_value = "12345600"
dt_datatable = {"123456", "263456"}
Thank you in advance.
Firstly, from your example above you dont have a datatable, it looks more like a list however for this answer I will assume that you have the following string called
output_value
and a datatable calleddt_datatable
with a single column calledpartial
.The below line of code sort of answers the above question, it will identify the first row as this meets the criteria inferred in your question,
output_value
starts with whats in the row meaning they have a partial match.This could be tweaked to use other string functions depending on your requirements, for example the below checks if
output_value
contains the string in the row rather than starts with it.One of the difficult bits of development and it seems to crop up more in RPA is matching, you need to define exactly what you want to match on then create your rules around that. eg for a match it has to start with it not end with it, or it just must contain it etc...