Mathias Mittmann

Creating a db based key-value provider

Discussion created by Mathias Mittmann on Apr 15, 2013
Latest reply on Apr 16, 2013 by Mathias Mittmann

Hi,

 

I'm using Blaze Advisor 6.8. For a decision table I would like to create a provider which allows users to select from a drop down list.

 

I managed to create such a provider using the Generic provider type based on the UserDefinedDisplayValueProvider class. However, here I have to enter the key/value pairs manually. Other provider types like the Value List and Database provider don't allow me to create key/ value pairs, only a simple array (value list without keys). What I would prefer is to have e.g. a database provider which allows me to select the key value pairs from a database. The result would be for example:

 

Key/Value

m/Male

f/female

 

However, I don't see how I can tell the database provider to use the key for generating the SRL for the decision table and displaying the value in the decision table. Something similar to what the Generic provider type based on the class UserDefinedDisplayValueProvider allows me to do. Is this possible? If so how?

 

Another question for the database provider would be where I can maintain connection parameters and pass them to the provider using a variable. I don't want to hard code the connection parameters into the provider, as they differ on DEV, QA, PRODUCTION, etc.

 

Appreciate you support!

 

Best regards,

Mathias

Outcomes