I want to convert the code below to make the column dynamic. I want to look up what is in the column of an input that is set in the configurator. The obvious choice to me was to use column. I also tried columns and column_value but did not have any luck without hard coding the column name into the syntax. I also tried to use a parameter in the UD method to pass the column name in, but that didn’t work either. Am I missing something easy to get this to work or should I go back to my original code that was working?
if (Inputs.cmb_model.Value != “”){
var model = Db.UD02.Where(u => u.Company == “company” && u.Part_c == Inputs.cmb_model.Value).Select(u=>new{u.MSRP_c}).FirstOrDefault();
If I read this correctly I think this is what you are looking for?
string ControlName = "myCombo"; // Could be from UD parameter
if (((InputValueBound<String>)Inputs[ControlName].Value).Value != "Stuff"){
// Do something cool here
}
Yes, I created new columns in the UD table but instead of listing them I want to use an input form the configurator. I can’t seem to figure out the context to set a column equal to a value, though. Works great if I know what column I want and put it in through