• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

refresh combo dropdown from a different widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • refresh combo dropdown from a different widget

    I have a form with dropdowns which is used to filter a grid.

    I have a second form which is used to add new data. There's a Save button on this form that calls a button helper RPG program.

    When success is returned from the RPG the grid data is reloaded using Show/Hide widgets. I would also like to refresh the dropdowns in the form.

    Is there any way to do that either with Script or RPG helper program?

  • #2
    Yes, take the following steps.
    • Create a new app variable, let's say you call it "reloadCombos".
    • Hover over the form with the combos and click the settings icon (top left).
    • Click the "Link To App Variables" button.
    • Click the "Load Data" section. You should see your combo fields on the right side.
    • Select the "reloadCombos" app variable for the fields you wish to be reloaded.
    • Last, you need to set the reloadCombos app variable to a value of "true" whenever you want the data to reload. You can either do this through your RPG program or via the Set App Variables behavior on success=true.
      • If using the RPG program then call: SetResponse('appVar':'reloadCombos':'true');

    Comment


    • #3
      That's awesome! Thanks!!
      Does the app variable get turned back off afterwards for me, or do I need to do that manually?

      Comment


      • #4
        Yes, it will automatically be turned back to null/false after it is set to true.

        Comment

        Working...
        X