Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Multiple Select Search Criteria

    I'm currently migrating from SmartClient 8 to SmartClient 10 (v10.0p_2014-09-29/EVAL Deployment). I've found an issue with search forms.

    When I call getValueAsCriteria on a form with a multiple select item (a SelectItem with multiple=true) the criteria returns with an operator of "equals" and a value as my search list. In version 8 this used to return an operator of "inSet". This breaks my server side since "equals" is translated to an "=" in my db query and "inSet" is translated to an "in" in my db query. I've tried setting operator on the field to control this, but it does not seem to work.

    Is isomorphic aware of this issue? Is this a bug or am I doing something wrong in version 10?
    Last edited by patrickmann; 29 Sep 2014, 13:19.

    #2
    This isn't something we're aware of. Can you show sample code that reproduces the issue with setting the operator not having an effect?

    Comment


      #3
      Try the following code on the 2 different URLs and you will see what is happening. In 8.3 "inSet" is returned as the operator. In 10.0 "equals" is returned as the operator.

      http://www.smartclient.com/docs/10.0/a/system/reference/SmartClient_Explorer.html#formControlMultiSelect

      http://www.smartclient.com/docs/8.3/a/system/reference/SmartClient_Explorer.html#selectItem

      Code:
      isc.SearchForm.create({
          ID:"exampleForm1",
          width:450,
          fields: [
              {
                 name: 'animals',
                  type:"select",
                  title:"Select Multiple (PickList)",
                  multiple:true,
                  multipleAppearance:"picklist",
                  valueMap: [ "Cat", "Dog", "Giraffe", "Goat", "Marmoset", "Mouse" ]
              }
          ]
      });
      
      isc.Button.create({
      ID: 'testButton',
      title: 'Click Me',
      click: function() {
      debugger;
      var criteria = exampleForm1.getValuesAsCriteria(true,'exact');
      var message = isc.JSON.encode(criteria);
      isc.warn(message);
      }
      });

      Comment


        #4
        I went back and set the operator and it did fix the test case above. I'll double check my code...

        The default for multiple changing still does not make sense. Can the default for multiple be changed back to "inSet"?

        Comment


          #5
          We've fixed this - by default, it now behaves as it used to in earlier versions - please retest with a build dated October 6 or later.

          Comment

          Working...
          X