Query - Set/Reset Data with AJAX

I am using a Query object as a filter-builder intended to drive a workflow process. The filter I am using gets the "Data" parameter via ajax. It is updating too late to be used.


This snippet includes the data defined in an object at the beginning of the snippet. If I include that in the "data" config parameter (currently set to an empty array), it works fine. When I try to add it afterward, using
$$('myQuery').config.data = query_data ... it does not work.

My goal is set/change that "data" parameter after the "Query" object is defined. That way, I can trigger ajax to update "Query" parameters, reducing time to load.

If this is possible, would you please update this snippet to show me how?


  • So, I realized I may not have been clear enough to get any help. So, here goes...

    Normally, when you set the data parameter of a ui.query definition, matching filters will display with a checklist of selectable values between the selection fields and the editor's buttons.

    In my example snippet, adding query_data to the "data" property of the JSON definition works. So, selecting the field name "Manager" to be a filter field results in a list of Managers' email addresses which may be selected/deselected.

    If, as with my other snippet, I leave the "data" parameter out of the initial definition (assuming I will get the values from an AJAX query) ... Then, I attempt to add query_data using


    ... The list of managers never shows up.

    Can somebody help me figure out how to update the "data" parameter of a ui.query object after an AJAX query completes? Or, can I just put the URL into the "data" parameter?

    Any help would be much appreciated!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion