Which API method to set the rule value at particular row con

Posted by Kevin Wagner on 30-Sep-2015 20:26

Hi,

From Corticon API in the interface IRulesheetTableModel  I used either setCellValue() or setRuleCondtionValue() to set the rule value at particular row condition. However, I got the value but red color.

For example: my condition is the attribute with custom data type as an array value such as attribute called "programs" with values {A, B,C}. After using those API method, I got the result like below with red color on the rule value

Conditions                                         Rule at column 1

programs                                             {A, B}

I don't know there are any different API methods that I can use?

Please help me.

Thank you.

Posted by Chris S. Hogan on 02-Oct-2015 08:54

Here is a sample class that creates a rule sheet which uses a custom data type. The vocabulary is also provided.

Download Example (zip file)

All Replies

Posted by Chris S. Hogan on 01-Oct-2015 08:22

For text attributes, you should enclose all values with single quote marks:
 
{‘A’,’B’}
 
Christopher S. Hogan
Principal Systems Engineer

Progress

PHONE 646-201-4123
MOBILE 646-243-4282
www.progress.com
Twitter
Facebook
LinkedIn
Google+
 
 

Posted by mparish on 01-Oct-2015 09:15

That works if they are plain String data types.
But that doesn't  work for Custom Data Types.
That does not appear to be supported.
I got the same error when I tried it.
The workaround may be to avoid using CDTs.
Mike

Posted by Kevin Wagner on 01-Oct-2015 12:42

Yes, I agree with you, This happens to me. It doesn't work with custom data type. Is there any way we can do it?

Posted by Kevin Wagner on 01-Oct-2015 16:09

Hi Chris,

Even though, I enclosed all values with single quote, it still doesn't work and I still get red color on value. Is there anyway we can do it with custom data type?

Posted by Chris S. Hogan on 02-Oct-2015 08:54

Here is a sample class that creates a rule sheet which uses a custom data type. The vocabulary is also provided.

Download Example (zip file)

Posted by Kevin Wagner on 02-Oct-2015 10:52

Hi Chris,

Thank you very much for your help. It works.

This thread is closed