cancel
Showing results for 
Search instead for 
Did you mean: 

Compared text of two data items not working in control room

BernadetteStroe
Level 4
Hi all,
This is driving me crazy. I have text in a data item (three paragraphs, not separated by a break). As part of my process, I read a larger body of text from an HTML page and save that in another data item, let's call it report. When I search the report data item for the text in the data item using Instr, the result is false. I can see the text in the data item.

I've tried Replace to remove all spaces. It works in process studio but not in control room.

Any ideas how to compare a large number of lines of text in this way?

Thanks in advance
Bernadette

------------------------------
Bernadette Stroeder
S&P Global
------------------------------
1 BEST ANSWER

Helpful Answers

John__Carter
Staff
Staff
Hi Bernadette - if the InStr works in Studio then logically the expression must be correct. In Control Room the logic is identical but the speed of execution is higher, so could it be that the synchronization logic between the object and the target application is not coping with the increase in speed?

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

View answer in original post

4 REPLIES 4

Hi Bernadette

I think the main problem here will be the size of the text comparison, the greater the number of characters the greater the risk of error. You can mitigate this by removing unnecessary spaces as you have done but it still might not resolve the issue. Can you provide the details of the calculation you are using for comparison so we can provide more help?

------------------------------
Michael ONeil
Technical Lead developer
Everis Consultancy
Europe/London
------------------------------

John__Carter
Staff
Staff
Hi Bernadette - if the InStr works in Studio then logically the expression must be correct. In Control Room the logic is identical but the speed of execution is higher, so could it be that the synchronization logic between the object and the target application is not coping with the increase in speed?

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

sonuiiml
Level 5

Hi Bernadette, 

I  had faced similar issue in one of our past projects. I tried comparing after a Lower(Trim(text)). Converting everything to lower makes it a little convenient
Give it a shot 



------------------------------
Susamay Halder Consultant
Consultant
Bruce Power
+1(437)217-1086
------------------------------

BernadetteStroe
Level 4

Hi all,

Thanks so much! It seems to be a combination of things. A lot of text and number characters in the data item to be searched (+11,000) plus synchronization in control room. So I had to rethink the approach. I created four separate data items containing the text to be searched for, then applied the InStr function for each in a single decision stage linking them with AND. This seems easier for the process to handle. 

It works now in control room but I'll continue testing. Can you please tell me whether this might have been the issue InStr(Lower(Replace("Text", Chr(32), "")), Lower(Replace("Data Item", Chr(32), ""))>0

I'm writing on my mobile, so apologies for too many or too few brackets! 😃

thanks again
Bernadette



------------------------------
Bernadette Stroeder
S&P Global
------------------------------