Announcement

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

    [BUG]: fieldValuesAreEqual in ISC_Core.js returns true for undefined compared to null

    [Ingredients]
    * A restdatasource with sparseupdates
    * A form with two fields: name (with value 'aa') and street (with value 'cc')

    [Recipe]
    Submit the form and only update the field name, make sure the server returns the updated name field and field street with value null (some server logic changed the street field to null).
    Now the street field is not updated and still displays 'cc'. When returning something else then null, the field does update.

    [Investigation]
    After the trip to the server SmartClient checks if the submitted value (undefined for street) is different from the returned server value (null). Because the == operator is used in the fieldValuesAreEqual method in ISC_Core.js@81421, it's conclussion is that it did not change.

    [Suggestion]
    Check with === or update the field if the field is specified in the response and wasn't submitted.

    #2
    What version of what product are you using?

    If you have not tried the latest patched version, please try it - fieldValuesAreEqual changed recently to cover various additional cases.

    Comment


      #3
      Sorry,

      I was using version v110p_2016-10-31_LGPL and now tried the latest nightly v110p_2017-01-11_LGPL, but the same behaviour (and same implementation, also the fallback == comparison).
      I've included a screencast of the behaviour described above.
      Attached Files

      Comment


        #4
        Any update on this?

        Comment


          #5
          Apologies - a fix was added for this on January 17 and we neglected to update the thread.

          You should see things working as you expect in any recent build of 10.1 and later.
          Last edited by Isomorphic; 16 Feb 2017, 05:34.

          Comment

          Working...
          X