What is the purpose of the primary field? Here are my fields:
Street/city/state/zip/name of facility/website
The only field that would be unique here is the name of facility. Is that the primary key?
And how do you change the primary key field? Right now it’s set on the city. How would I change it?
When you create the collection, it has a field created by default. In most cases its “Title” which is there when you create the CMS. The field with a flag right next to its name is the primary field.
It’s main job is to decide the page url of dynamic page.
Keep working on the dynamic page as usual, Don’t worry about primary field.
Feel free to ask if you any other questions.
Thanks very much. So the info on that field will be in the URL of the dynamic page.
To be precise, it will decide the slug. So if your field value is “best sellers 2025” the slug will become “best-sellers-2025”
A primary field it is not necessarily used for the URL slug. The slug can be changed from the SEO settings for the dynamic page from the editor. Changing the slug to a different field will not change the primary field in your CMS. It will stay the same.
A primary field is used as a default, required field, which I probably think is Wix’s way of ensuring that the collection has at least one column and is not completely blank. Also it becomes a sticky column on the left that can help with navigating your collections with ease, especially large collections with lots of data.
So for my purposes, as a beginner, the primary field has to be unique, correct?
Hello, i hipe you understood all what they told you?
Yes, You get get more information here - CMS: About Your Collection Fields | Help Center | Wix.com
If you have dynamic pages and are using the primary field as a URL slug, then yes it needs to be unique to function correctly. If not using it as a URL slug, then need not be unique.