Two Way Relationship - Do Null Values Pass?

Hi Team,
When using a Two Way Relationship to link entities, if a value is removed from the field in Entity A, will it also be removed in Entity B?

For example, if Entity A has a list of: Apples, Bananas, and Oranges, if a user removes “Apples” from the list in Entity A, will it also be removed from the list on Entity B?

Thanks!

Hi @Harris_Stevens

The two way relationship you are using has been placed via “Shared Field” facility, the field values in the related entities are automatically in sync.

@Tosh_B - Thanks for that information! So if a value is removed from the list in Entity A, but not from Entity B, then would that be a bug that needs to be investigated?

Hi @Harris_Stevens

Seems like it’s not an issues because there are 2 methods for establishing relationships between entities i.e.,

  1. Via shared field
  2. Distinct fields

If the data in field is not sync then the established relationships between entities might have been featured via Two Way (via Distinct Fields) Relationships method.

It’s about the various use cases where these two different facilities can be used to achieve the appropriate solution.

The relevant information can be checked in detail via:
https://hitchhikers.yext.com/modules/kg123-data-modeling/02-linking-entities/

Hope it will help.

Hi Harris,

Reiterating what Tosh said, I would first check whether the field you’re looking at is set up as a two-way relationship (one field that’s automatically synced) or two one-way relationships (two separate fields). If it’s a two-way relationship and updating Entity A did not update Entity B, that sounds like a bug to escalate.

Hi @Tosh_B and @Kristy_Huang - in this case, it’s a shared field. In my use case, the field is updated in one entity via API, and I expect it to be updated in the other entity since they’re linked.

In this example, an item was removed from the field in one entity, but then not removed from the other entity.

Hi @Harris_Stevens

If that is the case then as @Kristy_Huang mentioned, such case might be a bug that need to escalate for further investigation and solution.