How To Clear Searching ComboBox in Container

How To Clear Searching ComboBox in Container

  

Hi ,

I have 2 comboBox which serve for record searching purposes.I want to provide a Clear button to clear all the selected value.How should I do that?Below is the print screen of the 2 comboBox. Country comboBox uses aggregate in preparation,Entity comboBox use the input from Country to search for Entity falls in the Country.

Does anyhow has any idea?



Solution

Hi Johnson,

For the first Dropdown, simply assign to variable LCCountryId the value NullIdentifier() and it will "loose" it's current selection.

For the second Dropdown, you also want to clear the Source Record List. How you do this depends on how your GetEntityGroupByCountry(...) action is implemented. If it returns an empty list when you pass it NullIdentifier() as an Input Parameter, you only need to apply the same pattern as for the first Dropdown: assign to variable LEntityGroupId the value NullIdentifier().

If your GetEntityGroupByCountry(...) action does not return an empty list when you pass it NullIdentifier() as Input Parameter, the pattern is slightly more complex and my suggestion (off the top of my head) would be:

  1. Create a new local variable on the screen, eg. EntityOptions, with the same data type as the output of the action GetEntityGroupByCountry(...)
    1. Create a second local variable on the screen, with the same data type as EntityOptions, and name it EntityOptionsEmpty
  2. In your Preparation and/or Screen Actions make sure you assign the output of the GetEntityGroupByCountry(...) action to EntityOptions;
  3. Change the Source Record List to EntityOptions
  4. On your Clear screen action, assign to variable EntityOptions the value of EntityOptionsEntity (to clear the list) and assign to variable LEntityGroupId the value NullIdentifier() (to clear the current selection).

Might be missing some steps, but this would be the general gist.

Hope this helps

Solution

Thanks Jorge.You are always helpful !!