Rule Designer - Compare a reference to a SmartObject value

  • 8 January 2018
  • 4 replies
  • 5 views

Badge +1

Hello,

 

Does anyone has issue to make simple comparison between values from a Reference and a External SmartObject:

12503i94C6C4DC097B02FF.png

 

We want to compare that the record contained in the SQL Database is equal to the one present in the K2 Reference SmartObject.

But the condition above always return false even if the PO# equal the PO_NUMBER returned by the SmartObject.

 

We tried to trim the result but it is also not working, making an output of the TAS Unregistered > PO# and List > PO_NUMBERwe can see that the value are equal:

Trimmed PO# from form = PX0000
Trimmed PO# from Identity = PX0000

 

We tried to use the Contains function also:

K2 Designer contains.png

Here we return the entire collection from the List method.

But in the same way the result is False even if whenwe output each element they are there:

Lookup IDENTITY List of PO_NUMBER = PX0000 PZ0000 
Contains true/false = False

 

I read the documentation concerning Rule Designer but there is only comparison between a Reference and a static text field.

I don't know if we are missing something .. this seems very wierd.

 

Do any of you encountered similar issue ? Is there a trick to be able to compare two objects like that ?

 

Thanks in advance,

Best Regards,


4 replies

Userlevel 6
Badge +16

Hi,


 


I haven't had a chance to test this, but you can pass the TAS Unregistered PO # item reference to a process data field step first and use this data field in the Decision step instead of the item reference to see if that will work or the value is returning correctly. For the List PO_NUMBER SmartObject mapping, can you manually set a PO_Number value? Does this return corrected value instead of using TAS Unregistered PO # item reference?

Hi,

 

I am also facing the same issue, anyone has any update / steps to resolve this.

 

thanks

Antony

Badge +8

Do you have an exact set of repro steps? I tried to reproduce this behavior using a basic SmartBox SmartObject but was not able to. 

Scenario is 

 

1. Create EmpDetails table with EmpID (PrimaryKey), EmpName, EmpAge

 

2. Create EmpDesignation table with EmpID(FK),EmpName ,EmpDesignation, EmpDesigYear

 

3. Create SmartObject to get both the table values (Advanced SmartObject)

 

4. In wotkflow after SmartObject call, create Decision Task and add condition like 

        Left hand Side = EmpDetails

        Right hand Side = EmpDesignation

 

        Condition 1: Match all EmpIDs from Left hand side and loop thru and match with right hand side values

 

Sample Data

 

EmpDetails table has 

 

EmpID =101 , EmpName =Lara, EmpAge =31

EmpID =102 , EmpName =Clara, EmpAge =32

 

EmpDesignation Table has

 

EmpID =101 , EmpName =Lara, EmpDesignation =SSE, EmpDesigYear= 2001

EmpID =101 , EmpName =Lara, EmpDesignation =TL, EmpDesigYear= 2004

EmpID =102 , EmpName =Clara, EmpDesignation =TL, EmpDesigYear= 2008

 

In This case , the WF should pass, but actually its failing (going thru false path)

 

Help Much appriciated.

 

Thanks

Antony

Reply