I am trying to figure out a way in my customization to change the drop down for some UOM fields based on the entry in another field on my customization.
For my scenario I have different specifications of “tanks” (We manufacture and service tanks for dangerous goods e.g. petro, crude, etc.). I have a code for the different types of tanks and we need to store the numeric specs in either metric or US measures depending on the tank type (e.g. TC406 or MC406)
I have created user codes for the different UOM for metric and US measurements. e.g. distance is UOM-DI-TC (metric) and UOM-DI-MC (for US).
I found I can use an epiCombo and enter filter criteria in the SearchFilter parameter “CodeTypeID='UOM-PR-TC”’. This works great and the metric values are displayed in my customization.
My problem is when I have records where the tank specification is for US measurements then I need to change the filter. For example, in the above the SearchFilter should now be “CodeTypeID=‘UOM-PR-MC’”.
Looking at other posts it appears I can programicatically change the value in my UOM epiCombo’s SearchFilter field based on the change in my UD Tank_Spec_c field.
My questions are the following:
- Am I on the right track with my approach? (I tried to get this to work using BAQ Combos but BAQ Markup language is not well documented and a UD field does not appear to work anyway)
- Should I create a form event OnChange for my tank spec field and modify the searchFilter fields for all the UOM controls, or
- Should I add code for a ‘before’ even on the epiCombo controls?