Updating reference fields made easy

I was probably overthinking this when I tried using reference fields but with a little help from Wix support which led me to find a solution, I finally figured it out! WITHOUT code (I know this forum is for Velo but if we can do it without code, why not share the knowledge).

I discovered I could update the reference fields in the back end Content Manager but couldn’t figure out how to put them on a form for my users to add or update. I didn’t want users anywhere near the back end Content Manager!!!

What to do:

  • Create the reference field in the data collection (call it collection A ). When you create the item, you will be prompted to enter which data collection it references ( collection B ). It will use the primary key of collection B to fill into your new reference field in collection A .

  • The user will see a list of the primary items of data collection B you are referencing so they can choose one. NOTE : the drop down list cannot be filtered so this wouldn’t work well with a very large data collection. Also, notice what it says above for Connect a List - this is automatically done for you. When designing the primary key for your data collections, keep this in mind that the primary key field is what is displayed when you’re updating reference fields.

Furthermore, to display something from the referenced data collection B , when you connect a field, you will see the list of data items in the referenced collection. On my docent roster, I display FirstName LastName of the mentor.


This works when you reference other data collections or if you want to create a reference to the same data collection (which is what I did above). In my docent roster, I assign mentors to trainees which are also in the same data collection.
#reference #referenceFields

Thank you for sharing! I’m moving this to our Tips, Tutorials, Examples category.

I didn’t know that was a category! Thanks

This works for referencing, but it does not work for editing or updating.

My repeater has multiple items (Read/Write mode). Pretty certain this worked when I posted this last year. Now only the first item in the reference data collection is displayed in the dropdown (Mentor in this example). I’m going to report this to Wix.

My workaround is to put the item outside of a repeater. One record is updated at a time.

All of the items now show and I can update one record at a time!

see my post above