Search code examples
ioscloudkit

How to create new fields in cloud kit?


I'm having an issue with the fields (or attributes, they used to be called) in my cloud kit database. Whenever I create a new field, the records that are stored in that field are always titled "No Name" according to the record type ("State") despite what the actual record title which is "happy" as shown here:

enter image description here

I already tried editing and saving the record it again but that did not work. Can anybody help clarify this issue?


Solution

  • When looking at actual records in the public database in the CloudKit Dashboard, it looks at the field names for that that record type (the "State" record type in your case) and tries to pick the one most likely acting as a title. If the field it chooses has an empty value, it shows "No Name" for the title.

    Looking at your screenshot, it seems to be picking the first field ("WI") and showing it's value, which is not set for the selected record.

    On a separate note, it seems odd that you have what look like state abbreviations as field names for your State record type. It's possible that you want an "abbreviation" field on your State record type, where the value might be "WI" or "CA".