Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear Locations won't pass Null but Keeps the existing Values in Geo Location Fields. #2445

Open
ruchiranavishka opened this issue Aug 4, 2023 · 7 comments

Comments

@ruchiranavishka
Copy link

Please fill out the following details:

  1. Version of Mobile SDK Used: 10.1.1 and 10.2.0
  2. Issue found in Native App or Hybrid App: Hybrid app
  3. OS Version: 12.0.0
  4. Device: All android devices
  5. Steps to reproduce: When clearing location fields, passing Null value to a already existing values on Geo coordinates.
  6. Actual behavior: When clearing locations the form field value should be empty when passing null instead it keeps the existing values. This worked as expected in SDK for IOS.
  7. Expected Behavior: Empty the geo coordinates when lat long fields set to Null.
  8. Error Log: No error logs .But Form field Lat Long won't pass the value when set to Null. Same scenario goes with Double values.
@brandonpage
Copy link
Contributor

Hi @ruchiranavishka can you please further explain what exactly you are doing? The Mobile SDK does not maintain a location field on user account or any other native object. Is the issue that you are trying to send null for a location value on a rest call? If so what is the endpoint?

@ruchiranavishka
Copy link
Author

ruchiranavishka commented Aug 8, 2023

We are sending it through smartstore. See

export const saveInSoup = (data, soupName, idPath = defaultIdPath) =>
  new Promise((resolve, reject) => {
    smartstore.upsertSoupEntriesWithExternalId(
      storeConfig,
      soupName,
      data,
      idPath,
      (res) => resolve(res),
      (err) => reject(err)
    );
  });

data = Object fields form with values. Where Location field set to Null

@wmathurin
Copy link
Contributor

That is odd because upsert does not do a merge between old record and the provided one, it simply replaces the old record with the provided one. Could it be that the external id / external id path does not match the existing record, causing the upsert to actually create a new entry?

@wmathurin
Copy link
Contributor

Could you inspect the store to see what is happening? You can use the SmartStore inspector for that.

@wmathurin
Copy link
Contributor

Closing for lack of response from customer.

@NewTech2000
Copy link

Hi @wmathurin, the issue same as @ruchiranavishka posted. When clearing the Location field value should be empty when passing null instead it keeps the existing values. This worked as expected in SDK for IOS

@wmathurin wmathurin reopened this Oct 26, 2023
@NewTech2000
Copy link

@wmathurin Any update regarding this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants