cancel
Showing results for 
Search instead for 
Did you mean: 

Possible Data Item initialization bug affecting InStr()

yadidgarbo
Level 3

Hi everyone,

I’ve encountered a strange and reproducible behavior in Blue Prism where the InStr() function — and even the Utility - Strings - InStr() → Contains action — do not return correct results until I manually open the Data Item or the Collection cell that holds the string value.

It appears as if Blue Prism only initializes or type-casts the value once it’s been opened in the Debug view.

Env:
Blue Prism version: 7.3.0
All variables are of type Text

Example:
TempName: JonDoe Maximus
Col_TempName: JonDoe

Decision:
InStr([TempName], [Col_TempName]) > 0

Result is False!

When i Click on the Decision Stage and Click on Excecute Value (in new Window) --> Answer is True.

To make sure both sides are Strings, I even created a temporary Data Item [Col_TempName] (Type: Text) and assigned it beforehand.

InStr(Lower("" & [TempName]); Lower("" & [Col_TempName])) > 0

and

Utility – Strings → InStr
Text: [TempName]

Substring: [Col_TempName]
Start Pos: 1
Search Methode: Text and Binary both same Result.

Observed Behavior:
As long as I don’t open the Data Item (or the Collection cell) manually in Debug mode,
→ InStr() always returns 0
→ Decision returns False

The moment I open the Data Item once (double-click it or preview it in Debug),
→ both expressions start working correctly and return the expected result.

It seems like Blue Prism isn’t initializing or refreshing the internal value until it’s manually accessed.

What I’ve already tested:
Explicit concatenation ("" & [Item]) to force string type → no effect
Using Calculation Stage before Decision → same behavior
Tried with values coming from both Collections and Queues → same result
Trim/Lower/Replace normalization → no impact

My Questions:
1. Is this behavior known or reproducible in other environments?
2. Does Blue Prism defer initialization or casting of Collection fields until they’re accessed in Debug mode?
3. Is there an official workaround to “pre-initialize” Data Items before Decision evaluation?
4. Could this be a limitation of the Decision parser or VBScript evaluation engine used internally?


Thanks in advance for any insights or confirmation from the community or Blue Prism engineers.

sry for Text Style dont know how this happend 🙂

 

0 REPLIES 0