[英]Blueprism unable to match two data items that are the same
I have an object which is trying to determine if a value it reads from on screen is the same as that passed to the object. 我有一个对象正在尝试确定它从屏幕上读取的值是否与传递给该对象的值相同。 This is a validation step and it doesn't appear to recognize them when they are the same.
这是一个验证步骤,当它们相同时似乎无法识别它们。 I have also tried trimming and lowering both values.
我也尝试过修剪和降低这两个值。 I have also tried Test Regex Match.
我也尝试过Test Regex Match。 Is there any way that I can get the object to recognize that they are the same, or is there a way for me to find out why they are not matching?
有什么方法可以使对象识别出它们是相同的,还是有办法让我找出为什么它们不匹配?
A strange thing. 一件奇怪的事。 If direct comparison failed, even after trimming and with regex failed, there is probably something wrong with some of the characters.
如果直接比较失败,即使在修剪后和使用正则表达式失败时,某些字符也可能有问题。 I would probably guess the spaces.
我可能会猜到空格。 Have you experienced this behaviour even on values without spaces?
即使在没有空格的值上,您是否也经历过这种行为?
Anyway, I would probably build a C# code stage like this, that accepts txt
(string) and outputs col
(collection): 无论如何,我可能会建立一个像这样的C#代码阶段,该阶段接受
txt
(字符串)并输出col
(集合):
col = new DataTable();
col.Columns.Add("Pos", typeof(decimal));
col.Columns.Add("Char", typeof(string));
col.Columns.Add("CharNum", typeof(decimal));
char[] arr = txt.ToCharArray();
for (int i = 0; i < arr.Length; i++)
{
DataRow row = col.NewRow();
row["Pos"] = i;
row["Char"] = arr[i];
row["CharNum"] = (int)arr[i];
col.Rows.Add(row);
}
The result would be like this: 结果将是这样的:
Try to run the code stage on both of your values and see if there is a visible discrepancy. 尝试对两个值都运行代码阶段,看看是否存在明显的差异。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.