Announcement

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

    12.0p / 12.1p Picklist optionCriteria issue and/or server criteria issue

    Hi Isomorphic,

    please see the last dropdown in these specialValues-samples: v12.1p_2020-04-10, v12.0p_2020-04-11.

    For 12.1p, the sample shows no values, while it does for 12.0p.
    This is due to the criteria in the DSRequest in the RPC Tab of the Developer Console I think:

    12.0p:
    Code:
        data:{
            units:"Ream"
        },
    12.1p:
    Code:
        data:{
            operator:"and", 
            criteria:[
                {
                    fieldName:"units", 
                    operator:"iEquals", 
                    value:"Ream"
                }
            ]
        },
    I assume 12.0p is correct here with it's simple criteria format, even though I don't understand why there is no data with 12.1p.
    If you add pickListProperties: { dataFetchMode: "local"} as well as a field {name:"units"} to pickListFields in 12.1p, you'll see that client side filtering is working.

    But if you change the criteria to
    Code:
            optionCriteria: { _constructor: "AdvancedCriteria", operator: "and",
            criteria: [
                { fieldName: "units", operator: "iEquals", value: "Ream" }
            ]
            },
    it shows no data in both 12.0p and 12.1p. So perhaps an server problem in both?


    Best regards
    Blama

    #2
    FYI: The next sample customInlineControls has the same criteria and same problem.

    Comment


      #3
      This should be fixed back to SC 11.1p, as of the nightly builds dated 2020-04-12.

      Comment


        #4
        Hi Isomorphic,

        that was a really strange one. Out of interest: What was the root cause here?

        Best regards
        Blama

        Comment


          #5
          Enum DataSourceFields had a slightly different logic flow on the server and some type checks were failing along that path.

          Comment


            #6
            Hi Isomorphic,

            thanks for the explanation. Seems to be unrelated and a side effect of something else?

            Another issue (perhaps):
            I can see that there is data now in v12.0p_2020-04-12 and v12.1p_2020-04-12.
            But the sample in 12.1p sends advancedCriteria, 12.0p doesn't (see #1).
            Even though this does not matter to me, I assume this change is not on purpose?

            Best regards
            Blama

            Comment


              #7
              It's an intended change - a bugfix.

              In 12.1, ComboBoxes now submit AdvancedCriteria when optionCriteria are specified, since optionCriteria are generally intended to be exact match, whereas startsWith is needed for the value typed in by the end user. So the switch to AdvancedCriteria in 12.1 is intended, documented, easily reversible if needed, and was release noted.

              https://www.smartclient.com/smartcli...tyleInPickList

              However this revealed a pseudo-bug that has been there a long time: you can't use the "iEquals" operator on an "enum" field, because the underlying type of the field isn't known: it could be text or integer.

              While rejecting the "iEquals" operator is technically correct in the absence of other information, and we decided it makes more sense to allow the operator through to the persistence engine, where it will work if the underlying type is text and fail obviously if the underlying type is integer. This gives people incorrectly using iEquals with an integer enum field a clear failure, rather than just a warning about ignored criteria, which they might never see.

              This also will be release noted.

              Comment


                #8
                Hi Isomorphic,

                thanks for the explanation.
                I did forget about the release notes and just had a look at the ones for 12.0p.
                Just as an FYI in case this is an oversight: The ones for 12.1p are not public yet, here.

                Best regards
                Blama

                Comment

                Working...
                X