Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3390520
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:42:05+00:00 2026-05-18T03:42:05+00:00

I have been trying to use the query functionality of the ItemFileReadStore to filter

  • 0

I have been trying to use the query functionality of the ItemFileReadStore to filter the list of a select widget’s selectable options and it seems that my queries are having no effect on the widget. The query is being done through the onChange event of another select widget, my objective is that when one widget selects a value the other one no longer contains that value as an option).
This seemed fairly simple looking at the “Codependent FilteringSelect/ComboBox widgets” example at dojo’s docs site. But following this example has left me with no results.
My widget that I am trying to use is below:

var sel1 = new dijit.form.Select({
                id:"sel1",
                name: "sel1",
                required: true,
                style: "width: 170px;",
                query: {value: "*" },
                store: selStore
        },"sel1");

I also have another widget sel2 which is similar and uses the same store. My ‘onChange’ event for both has the following code:

 dojo.connect(element, 'onChange', function(event){
                            dojo.forEach([sel1, sel2], function(element){
                                    if(element.getValue() !== event){
                                            element.attr("query", "{value: !" + event + "}");
                                            console.log("querying", element, element.query);
                                            element.store.fetch();
                                    }
                            });

As a result of this the console printout I get returns the correct element and the element.query is of the form: {value: !val1}, but nothing is being altered in the dropdown of either of the select widgets.
If anyone could be of any assistance it would be very much appreciated.
Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:42:06+00:00Added an answer on May 18, 2026 at 3:42 am

    After some search and experimentation I have found that dijit.form.Select does not work like the Filtered Select widget when it comes to querying its datastore. In order to query the datastore you must call the setStore method, passing it the same store currently being used and a query object of the form of a fetchArg (i.e. {query: {value: blah}}). See the fetch docs here.

    For the second half of the question about finding out how to eliminate options from the store in the effect of fetching all values != value1 you can use a store designed for these types of queries known as the AndOrReadStore which extends from ItemFileReadStore and is compatible with the dijit.form.Select widget, and simply use the NOT keyword.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to convert a complex SELECT query to an UPDATE query,
I have been trying to use routes.rb for creating a URL /similar-to-:product (where product
I have been trying to use the hibernate dialect for SQLite from http://code.google.com/p/hibernate-sqlite/ in
I have been trying to use/save the boolean value of a checkbox in other
I have been trying to use 3rd party tool called visiblox for rendering charts
I have been trying to use the document.getElementByID to pull information from an HTML
Right now I have been trying to use Launchpad's API to write a small
Ok I'm stumped. I have been trying to use Simpletip to create a tooltip
I have been trying to figure out why and how to use performSelector. I
I've been trying to use 'import poplib' to access gmail, since I have Pop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.