Configurator Default Value in Combobox

We are live on 10.2.200 but I am working on configurator in our 10.2.500 environment that we will be moving to once Accounting wraps up the year end.

I am just digging back into configurator. Haven’t messed with it for about 10 years. I have a combo box that is being populated from a lookup table. Everything comes in correctly but I am trying to figure out how to make it default to the first value in the lookup table. That initial value is used 90% of the time so I would like to avoid them having to select it unless they need to change it.

I found the tech reference guide. Any other good sources for learning configurator?

Can’t recall the syntax off the top of my head, but listboxes have an “index” or “selected” value you can set to the item # you want to be selected by default when the box populates… check the Infragistics controls reference as well… HTH

Thanks Mike. Would you put the code in the On Page Load?

I would have to backtrack to make sure I knew where the dropdowns get populated, b/c you’ll have to do it after that. If they are fed by a BAQ, I think they get populated during On Page Load, so On Page Loaded is probably better for the code to make a value default.

Mike,

I seem to recall in E9 that you could call a function (Progress at the time) and the return string contained the options but also the ability to select the first entry. I don’t recall the syntax but I’m pretty sure I duplicated the functionality with a UD Method.

Do you recall that?

Mark W.

You can set the Dropdown itme with a call in OnPageLoad, like:

Inputs.cmbDynamicLst.Value = "ChoiceX";

If the value you set it to is not a valid item, it is ignored and no item is selected.

2 Likes

And that works if there’s just a single Dynamic List but I recall we had two with different conditions so the UD Method worked better but this is a good nugget for those single DLs!

Kind of odd to consider dynamic list built from a Lookup, with no dependencies on other inputs as “dynamic” :slight_smile:

1 Like

The hard coded ChoiceX works for the proof of concept I am working on. Thanks. I might need to expand on this if we move forward with the project.

I was looking at the SelectedIndex that Mike suggested. All the options I tried threw “are you missing an assembly reference?” errors. Are those handled through “Add References” and how do I find the needed reference?

oh man - I was just talking off the top of my head. I may not have used the correct property at all. Once you have 5 languages in your head, the only thing you can count on is the help/reference pages. :flushed: :woozy_face:

1 Like

@Mark_Wonsil - can’t say that I do brother, sorry. I wasn’t doing CFG in E9 so I really only picked up after C# was in the mix.

I have a similar question here. I would like to show the Part Description on my inspection configurator form. There is not an option within the Context to do this, so I decided to create a BAQ and run it through a combo box. Ideally I would like the combo box to default to the first (and hopefully only) part description returned, so the user does not have to manually select it. Because of this, I do not have a “default” value, so setting the combo box to a string value like this will not work (unless I am missing something). Any help or other ideas is greatly appreciated.

If you just want the description to appear, you could make a UD function to return the part description, and set a label or text box to the return value of the function.

edit

Checkout the following post. In the middle you can see where it is querying the DB. You could query the Part table to get the description.

1 Like

This is just what I need, thank you for your timely response.