Object property value wrongly showing as null

Please see the image below. I’m not understanding why organization.logoUrl shows a value (which is correct), yet when I inspect the organization object, the logoUrl property shows as null. This causes an issue when trying to save the object in the backend with the correct data. While I’m not sure if this is relevant, you’ll see in the JSON data that object includes a parentOrganization object (we support a hierarchy of organizations) that also has a logoUrl property. I can’t imagine that is would cause a conflict or present a problem. I am specifically setting the organization.logoUrl value in my app. The parentOrganization object remains untouched and it’s properties are correct. It doesn’t make sense for the organization object to show a different value for the logoUrl property than organization.logoUrl. In case this is relevant, I set the logoUrl property using a file uploader component, which is working well. The object somehow not retaining the right property value is the issue. Please help, thanks.

Could you try printing the entire Page Data? (showing schematically):

print < Convert to Text < Page Data

Regards,
Mark

1 Like

Great thinking Mark. Here’s Page Data below. organization.logoUrl shows as a separate property from the object’s logoUrl property. I guess I can’t use “dot” notation when setting a property, which is what I did. I’ll use Set Property In on the organization object (getting it first from Page Data) and logoUrl property without “dot” notation. To close this out, could you please confirm that this is correct or suggest another approach? Thanks again.

Based on what you described, it appears you set organization.logoUrl before an object for organization was in Page Data.

When you set a property in an object and the property name uses the dot notation, the following will happen:

  1. Set value 123 for the property foo.bar
  2. Check if an object for the foo property exists. If not, go to step 4
  3. Set 123 for the property bar in the found object, go to step 5
  4. Set 123 for the property foo.bar
  5. Exit

Hope this helps.

Regards,
Mark

1 Like

Great, thanks Mark. It helps.