Introducing multi-reference properties

In release 103, multi-reference properties became available for all users in Appfarm Create. This is a feature we have been working on for quite some time, which simplifies data modelling and offers greater flexibility for experienced users.
Many of you have already started using this feature, and we are grateful for all the feedback so far! Several improvements are already implemented in release 104.

What are multi-reference properties?

Previously, reference properties in object classes were limited to referencing a single object. With multi-reference properties, you can now set up properties that reference an array of other objects or enumerated types (enums). For example, a Person object class can have a multi-reference property pointing to a Skill object class to hold multiple Skill objects.

Where can you set up multi-reference properties?

Set the cardinality of an object class property to Many when adding a new reference property in your data model. Note that once set, cardinality is locked to prevent data inconsistencies. App variables and data source properties can also be set up to be multi reference.


How can you use multi-reference properties?

Properties with cardinality many can be used in the same way as data sources with cardinality many, both in UI and Actions. In the UI multi-reference properties can be used as a data source for a table or an iterating container, or data-bound to a multi-select. or it can be iterated in a While or Foreach action node. The value processor has also been expanded to support the actions needed for seamless handling of multi-reference properties.


Best practices

Use multi-reference properties for simple references. Let’s say you want to track which users have liked an Article. Simply add a multi-reference property on the Article object class, pointing to the User object class.

Multi-reference enum properties. Multi reference is also available for enum properties. It can be handy when you for instance want to tag articles with multiple subjects or want products to belong to several categories.

End of many-to-many object classes? In short: No. While multi-reference properties are ideal for storing simple references, many-to-many object classes are still necessary when additional relationship details are required. Example: if you have a Product and a Warehouse object class, you should make an Inventory object class with references to a Product and a Warehouse, instead of using a multi-reference property. This way you can store information about the relationship, like keeping track of the current stock of a specific Product in a specific Warehouse.

Explore more about multi-reference properties in our documentation, and feel free to share your feedback or questions below!