cancel
Showing results for 
Search instead for 
Did you mean: 

Decision Table lookup with wild characters

former_member210541
Active Participant
0 Kudos

Hello Experts,

I have a decision table with 3 columns, the first 2 are condition columns and the 3rd one is a result column.

I have values maintained in the following manner

A1111Pack
A1211Freeze
A1311Reject
B1911Send

Now I want search my table as A1 and * and I expect all 3 values of 'Pack' , 'Freeze' & 'Reject' as my result.

How do i do that?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

your requirement does not really match the idea behind a decision table: the decision table is intended to return a result if all conditions specified in the condition columns are met. ALthough tehre is the concept of a partial match mode this mode does not return the partial matches but an exception that contains the maximal number of matched condition columns (in your case 1)

In order to retrieve the result you want you have to design the table differently:

A1111Pack
A1211Freeze
A1311Reject
B1911Send
A1Pack
A1Freeze
A1Send
But from my point of view that is not logical at least I cannot imagine a scenario where this would fit as you specified the second condition not without any intention. WIth the above design you can also omit the first three rows.
You can also use e. g. boolean expressions in the second column in order to model such a behavior, but as already mentioned it is hard to think of a scenario where that is logical.
Perhaps you should also take a look at the search tree expression and its capabilities, perhaps that is more fitting for your scenario
Best Regards
Christian
former_member210541
Active Participant
0 Kudos

Hi Christian,

Thanks a lot for the help.

I have one more question. Can I lookup my decision table with values like A* 111 and get the value Pack?

0 Kudos

Hi,

depends on how you have defined the condition. When the first condition column is a string you have several options to do the comparison. I think there is also the option "like" or "contains string" if I am not mistaken

Best regards

Christian

former_member210541
Active Participant
0 Kudos

Thanks Christian. I got the lead.