epiCombo limit to static data list

I created a ton of EpiCombo with the RetrieveOnActivate set to False. They have one of two Static lists

For the required fields that I check in a custom save button I used with the value set to null.
Results
Pass
Reject

For all other EpiCombos same with the RetrieveOnActivate set to False I used
Results
N/A
Pass
Reject

The drop down list works but you can enter any data you want if type in the box.

Is there anyway to lock these combo boxes down to only accept the text in the static list?

If it’s a finite defined list, like this, I’ll usually create a user code and tie the EpiCombo to the UC BO. You can also use Extended Properties to tie the underlying data field to the UD Codes. Then, when I add a combo, merely binding it to the custom field will default to the correct config.

Otherwise, I’ll use a BAQCombo.

I cannot type values into combobox configured as above. Though, that’s not specifically why I go this route. I, as a rule, try to avoid hardcoding static lists into a form customization.

@jtownsend

John thanks for the Friday afternoon reply. I have not made use of user codes yet so i need to do a little research. I think i see where you bind the user code BO.

image

I will see if i can figure it out.

thanks

Mike

Mike,

You don’t need to do any special binding on the field if the field you’re using is an Epicor field. For example, suppose you add a UD field to JobHead called “Results_c”. Here’s what you do:

  1. Create a User Code, example: “JobResults”, and you list the values you want to be valid for those results.
  2. Go to Extended Properties, pull up the JobHead_UD table, go to Results_c field, and add the User Code (JobResults) to this field.
  3. In the form customization, add an EpiCombo, bind it to JobHead.Results_c. You’ll notice a lot of other fields automatically fill in for you - Epicor does the work to have this come from the UserCodes table with the filter for the JobResults code.

Note: changing the extended properties makes a change to the Epicor schema. I usually have to log out of Epicor between steps 2 and 3, give it a few minutes, then log back in.

Kevin Simon

1 Like

Hey Kevin thanks for the response. Question Does this work with built in fields of a UD05 Table? I see where you can add the UD Code Type on the fields in UD05_UD but that field is not available in the UD05 table per the image below.

I figured it out thanks. I saw where the Properties of the combo box were changed using the wizard and applied those changes to the other EpiCombo’s I wanted to change.

image

Thanks

Mike

If you use the EpiCombo control, you can also set its style to DropDownList through custom code, so that it can only be selected through the drop-down list and the user cannot enter anything.
Exp:

add a EpiCombo
image
Set RetrieveOnActivate to fales
Set Staic data you need
image
Add custom code
epiComboC1.DropDownStyle = Infragistics.Win.UltraWinGrid.UltraComboStyle.DropDownList;


Save your custm form to test it.

4 Likes

I was doing it that way minus the custom code. I guess the code limits the entries the user can make to the static list. I was able to input anything I wanted in the combo box when I tested it originally.

I will keep it in mind for the next time.

I do like the user code option for the obvious reason, if the list changes you only need to edit in one place.