Forum Discussion

FICO's avatar
FICO
Community Manager
11 years ago

ruleset template display table display the selected value of the 0 to more type value hold from rule template

Hi,

I have a ruleset template (RST), it has a value Holder RST_VH1 (type: RT1 refer to the rule template, count: 0 to more). In the RST display format it is a display table for displaying the rules as table format.

In my rule template (RT1) it have value holder  RT1_VHA( count: 0-more, type: templateA), value holder RT1_VHB (count: exactly 1), value holder RT1_VHC (count: exactly 1). 

The templatA has a value holder TA_VHA it display as choice box, count: exactly 1. (choice box options values are: AA, BB, CC, DD, EE,..)

In the RT1 screen user define the rule they can input the value for RT1_VHB, RT1_VHC . they can also add more than one RT1_VHA, each add they choose a different value from the choice box.

Currently my RST display table contains 2 columns, they display the value of RT1.RT1_VHB, RT1.RT1_VHC of each rule.

Now I want to add RT1_VHA as another column to my RST's display table. This new column will display the string concatenation of user's choice of the RT1_VHA values.

That say for rule1 user add  AA and DD as RT1_VHA; for rule2 user add BB, CC and EE as RT1_VHA; for rule3 user didn't choose anything as the RT1_VHA. Then I want the new column shows  "AA,DD" for rule1; "BB,CC,EE" for rule2; "" empaty value for rule3.

Please suggest is this doable and how to do it.

4 Replies

  • FICO's avatar
    FICO
    Community Manager

    The table on the ruleset doesn't handle 0 or more. It would need to be a single entry.

    Not sure the complexity of the logic but you could have the user enter it as a single comma separated entry. Then in the srl portion have some extra logic to handle it the way desired.

    You could leave your 0 or more but then add another single field where they would re-enter them so you can easily display up front. Also, they could make it part of another field already in the table. Then again this is duplicate work that might be undesirable.

  • FICO's avatar
    FICO
    Community Manager

    You could implement a concatenation provider, which could get its values passed dynamically from TA_VHA. Have a look at the custom provider API, described in the API docs.

    The main thing to remember is to implement the NdTemplateLogicalValue interface, as this ensures that the concatenated value is not stored in the instance model, and is refreshed every time it is needed.

    Regards,

    Jostein

  • FICO's avatar
    FICO
    Community Manager

    Hi Joestin,

    I checked my custom provider API and didn't find the NdTemplateLogicalValue interface, Is it because my Advisor version is too old? I am using Advisor 6.5 and will soon be upgrade to 7.2.

    Regards,

    Eileen

  • FICO's avatar
    FICO
    Community Manager

    I can't really say when the NdTemplateLogicalValueProvider interface was introduced, but I would be surprised if it was not a part of 6.5. It is located in the package com.blazesoft.template.engine.

    You will have to write your own Java implementation of this interface, but that should be doable, even though I believe that particular interface lacks a description in the documentation (at least in your version).

    Regards,

    Jostein