Loading...

Stumped with qMulti-Selector

Stumped with qMulti-Selector

Home Forums QuickApps Forum Stumped with qMulti-Selector

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #5232
      Anonymous
      Anonymous
      Participant

      Hi Jason,

        Using a qMultiSelector you can filter the data from a selector based on previous selection.

      I have 2 lists, Countries(CountryID, CountryName) and Languages (LanguageID, LanguageName, CountryID).

      I use a qMultiSelector with 2 selectors, first selector to display the Countries and the second selector to display the languages spoken in the country I select.

      On the languages selector you need to use the properties Parent Field Name (set to CountryID) and Filter Field Name (set to CountryID).

      Create these 2 lists in your env, add some data and use the following configuration in the qMultiSelector Configuration property.

      One important thing I want to mention is that you need to set the property Refresh Page When Selection Change to true (checked) so the data is being refreshed while you change selections.

      I'd suggest you to read the docuemntation related to qMultiSelector and if you still have questions please let me know.

      <Configuration>

        &lt;PersistentSelector Title=&quot;1st&quot; SiteUrl=&quot;.&quot; ListName=&quot;Countries&quot; SessionName=&quot;SessionCountry&quot; DisplayFieldName=&quot;CountryID&quot; EmptySelectionItemName=&quot;-Select One-&quot; EmptyDropDownItemName=&quot;&lt;Empty&gt;&quot; DisplayFields=&quot;&lt;Fields&gt;   &lt;Field Name=&quot;CountryID&quot; /&gt; &lt;/Fields&gt;&quot; RefreshWhenSelectionChanged=&quot;true&quot; /&gt;

        &lt;PersistentSelector SiteUrl=&quot;.&quot; ListName=&quot;Languages&quot; Title=&quot;2nd&quot; SessionName=&quot;SessionLanguage&quot; DisplayFieldName=&quot;LanguageID&quot; EmptySelectionItemName=&quot;-Select One-&quot; EmptyDropDownItemName=&quot;&lt;Empty&gt;&quot; DisplayFields=&quot;&lt;Fields&gt;   &lt;Field Name=&quot;CountryID&quot; /&gt;   &lt;Field Name=&quot;LanguageID&quot; /&gt; &lt;/Fields&gt;&quot; ParentFilterFieldName=&quot;CountryID&quot; FilterFieldName=&quot;CountryID&quot; /&gt;

      </Configuration>

    • #5807
      Anonymous
      Anonymous
      Participant

      ,

      Thanks for the reply. I've been reviewing the docs for both the qmultiselector and the qselector since as I understand qmulti is built off of the regular qselector and I've been using the "refresh when change" option.

      As it relates to your example. I assume that within the languages list each language item can have multiple country IDs associated it to it, is that correct? That seems to be where I have problems. As long as my relationship is 1-to-1 I have no issue with selector one fitering selector two, but as soon as I create a 1-to-many relationship in the second list (languages) the filter doesn't seem to work. Does that make sense?

      Thanks again.

    • #5808
      Anonymous
      Anonymous
      Participant

      Hi Jason,

      My Countries list looks like this

      CA Canada

      US United States

      and the list Languages looks like this

      EN-CA English Canada CA

      FR-CA French Canada  CA

      EN-US English United States   US

      ESP-US Spanish Unites States US

      When I select US on the first selector the second would display

      EN-US English United States US

      ESP-US Spanish Unites States US

      when I select CA then I see

      EN-CA English Canada CA

      FR-CA French Canada CA

      This is one to many relation and it works. Just create those lists, add the values then use the my configuration from the previous post.

    • #4217
      Anonymous
      Anonymous
      Participant

      Hey there, new to the community … hoping some of you can help me with a qMulti-selector implementation that I can’t seem to figure out. Here’s my problem …

      I have a list of items which I want to filter by category and then location. I have created three lists starting with the master item list which uses lookup fields from the category list and location list. The category and location fields are both multi-select meaning an item can be assigned to multiple categories and/or locations.

      I’m attemping to use qMulti-selector to create the filters for category and location. So I configured the first selector to simply pull all the categories from the category list. The second selector for location is where the problem occurs as I want to list only the locations affiliated with that category. I’ve attempted to create that category/location relationship by adding the selected locations to the category list items and vice versa (categories to locations) by using a lookup field from the other list (again with multi-select values) but have been unable to correctly filter the secondary location selector.

      As far as I can tell the problem seems to be that one you have a “multi-select” attribute the data inserted in the fields ends up like “location 1; location 2; location 3;” (or cat 1; cat 2; cat 3) so when you attempt to use the parent/child filter the data doesn’t match as its comparing location 1 to “location 1; location 2” etc.

      So as a workaround I attempted to simply show all locations (no parent reference) and use the CAML filter to compare a session param using “contains” in order to filter out non-relevant locations, but no luck.

      Here’s a short example of what I’m attempting to do …

      Example 1Example 2Example 3CategoryLocationCategoryLocationCategoryLocationCat AN. AmericaCat BAsiaCat CEuropeAsiaEuropeS. AmericaEuropeN. AmericaS. America

      Hopefully this makes some sense. I feel like I’ve waded over my head and overcomplicated the idea. Hoping one of you can help straighten me out

      Thanks in advance.

    • #5809
      Anonymous
      Anonymous
      Participant

      Thanks I'll give it a try, but I think I see the difference between your example and how I've configured my lists. My version of list configuration (using you country/language example) would be like this:

      Country List:

      CA Canada

      US United States

      MX Mexico

      Language List:

      English     US; CA

      French     CA;

      Spanish     US; MX;

      In my language list configuration the country code field is a lookup item with the option for selecting multiple values so the data that gets put in the field isn't just a single country code but rather a delimited list of values.

      Quite possible that I need to rethink my list configuration.

Viewing 4 reply threads

You must be logged in to reply to this topic.