Forum Discussion

FICO's avatar
FICO
Community Manager
11 years ago

Value list from valueholders

I've a problem in implementing one of the business requirements.

There is a ruleset called ‘measure’ which contains value holder for 0 or many rules. Each rule has a value holder for it’s name, in this example, AA and CC.

Under each rule, I’ve a code template called code1 which has a dropdown value holder of type string, where I want to have rule1’ names populated in that drop down. In the example below, I’ve hardcoded names to A and B. Is there any way to have the drop down populate value holder names from the text boxes from rule1 in such a manner? I want in my drop down right under code1 to have:

AA

CC

Thanks in advance.question

2 Replies

  • FICO's avatar
    FICO
    Community Manager

    Hi - The only way to do this would be to create custom provider that reads the value from the parent value holders

    Baljeet

    mailto:[email protected]

  • FICO's avatar
    FICO
    Community Manager

    Hi,

    Yeah, if you want to collect all rule names in a dropdown, one way to go is to create a custom provider that reads rule names from the instance model, just like Baljeet wrote. There is one way you could (possibly) cheat, though:

    If you make sure all your rule names are "compiler friendly", i.e. they can be used as identifiers, you could add them as some internal type, and use the built in SRL Entities Provider to list them. For example:

    1. Create some internal marker class in Blaze Advisor
    2. Use the SRL Names-provider for your rule names value holder (please note that this will limit the types of names available to your business users). Add a hard coded prefix to your actual rule names (e.g. "Rule_" <yellow bubble>)
    3. Add a rule set variable in your template, whose name is taken from the SRL names provider. No pre- or postfix here.
    4. For your Code1 value holder, choose the SRL Entity provider and select your marker class as the type of entities to display. Select variables only.

    Please noe that using introspection features such as these might affect both RMA and compile time performance. Runtime performance will not be impacted, though.

    Regards,

    Jostein