Jump to content

Intelligent (Progressive) Capture Branch - 'is in' condition appears to be always true even though condition is not met


Recommended Posts

When using the 'is in' condition on a conditional branch in Intelligent (Progressive) Capture, the condition appears to always appears to evaluate as true even though the condition is not met.

Example

Condition used to branch to form with custom Priorities 1 to 5 on. Added Organisation Id is set, in case it was evaluation of nulls, but issue persists.

image.png.23ddd5c3034465b58dcb15d5a0dfca4f.png

Example using internal contact, so organisation id not set.

image.thumb.png.cbbe1ab7cc5dbb10022dc5115a0a4298.png

 

Example using external contact in organisation id is not 772 or 245.

image.thumb.png.5e317967c288aa271a6a5f5b379a7fe8.png

Cheers

Martyn

 

 

Link to comment
Share on other sites

Hi @Martyn Houghton,

The problem is that that the serviceid and orgid are returned as string types from the SM even though the real data type is a numeric. So the test is failing i.e. say you are checking for is in 123,456

The flowcode var returned is "123" meaning the test equates to:-

[123,456].indexOf("123")

This fails because "123" is not the same as 123

I will have a look at putting in some logic to check the "testing values" and the "variable" value...so if the test values are all numeric i.e. 123,456 and the variable value is "123" which can be cast to a number 123 

Will let you know how get on.

Cheers

Link to comment
Share on other sites

  • 3 weeks later...

Hi Martyn,

So this should be fixed in new admin ui and is out live.

You will need to redo the condition as it is generated at design time. I have modified condition builder so all values in an [is in] or [not in] are treated as the same type. So regardless if data is "1" or 1 the test will do is "1" in/not in ["1","2","3"]. Can you let me know if that works for you.

Thanks,

Link to comment
Share on other sites

Hi Martyn, 

I totally forgot about fields. I only applied fix to flow conditions. Your original post was about pcf flow conditions?  It will be same issue, so will apply fix there too.

You do not need to enclose your test values with quotes.

Cheers

Link to comment
Share on other sites

  • 2 weeks later...

@Martyn Houghton,

Can I get you to raise a support request as will need access to your instance to run the capture and debug it to see what the data and the expression is doing. 

When logging request can you provide the captured/name and how you are running it (from a Catalog service or straight from service desk table view etc)

Cheers

Link to comment
Share on other sites

It could be that for some reason the variable ref Service details->CatalogName is not actually set so test just fails. We will def need to access to instance to see what data is being used.

Link to comment
Share on other sites

Hi @Martyn Houghton,

I have found issue. To demonstrate:-

1. if you open the condition form with your browsers dev console open (F12)
2. Then change the "is in" from [Question,Incident] to [Question,Incident,testerror]

You will see the raw generated condition displayed in the browsers dev console. You should see that it only generate the "is in" part of the condition and does not do the "!=" or the "is set".  This is because of a bug in constructing [is in] loop breaking out of the whole condition construction loop.

If you can confirm that is what you see happening. 

So this is why condition always passes (or fails) because it is only testing the first bit when [is in /is not in] is the first test in the condition. If you put the [is in/is not in] as the last test in the condition it would construct the full condition properly (assuming there is only 1 is in/is not in text in the condition).

Will let you know when fix is published - should be this week.

Cheers
 

Capture.PNG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...