Which API method to set the rule value at particular row condition without getting red error besides setCellValue() and setRuleCondtionValue() in the interface IRulesheetTableModel? - Forum - Corticon - Progress Community

Which API method to set the rule value at particular row condition without getting red error besides setCellValue() and setRuleCondtionValue() in the interface IRulesheetTableModel?

 Forum

Which API method to set the rule value at particular row condition without getting red error besides setCellValue() and setRuleCondtionValue() in the interface IRulesheetTableModel?

This question is answered

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.

Verified Answer
All Replies
  • 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+
     
     
  • 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
  • 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?

  • 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?

  • 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)

  • Hi Chris,

    Thank you very much for your help. It works.