Good day. May I ask the process when importing Custom Fields? And also how to create Custom Fields thru spreadsheet import. I already know how to manually add the Custom Fields in version 22, but I still can’t understand how to do this thru spreadsheet imports. This was how it worked for me in version 21:
Import spreadsheet “DataStructure-usersCustomFields.xlsx” under category “User Admin > Custom Fields”. This was equivalent to Admin > “User Admin” > “Manage Custom Fields”, and then adding an entry with the fields Name ; Description ; Type ; Options ; “Role Categories” ; “Include in Data Updater”
Edit [GibbonEdu_folder]/resources/imports/usersCustomData.yml and add the entry for the custom field
Import spreadsheet “DataStructure-usersCustomData.xlsx” under category “User Admin” > “Custom Fields - Data”
Hi Richard, I see this is a post from the summer, I’m just catching up on some past posts now that the Gibbon team is back in school. This process should still work for custom fields in v22 as well. If you’re writing an import for something other than Users, you’d need to update the
and <code class="CodeInline">primaryKey: fields in the import file to point to a different table (eg: Staff).
I’ve made a note to add example imports for each of the new custom field contexts for v23. Thanks!
Thanks Sandra. I’ll check out those examples in v23 next year
Good day. I added a custom field “Miscellaneous Information” for Student (thru import) but it’s not appearing in “System Admin” > “Custom Fields”. Here are the steps that I followed:
I import from spreadsheet for the Custom Fields:
This spreadsheet contains this row:
The new record is saved in the gibbonCustomField table:
But the new record will not show up in System Admin > Custom Fields:
My setup is Gibbon 23.0.02, PHP 7.4.3, Mariadb 10.3.34. Thanks in advance
Hi Richard, thanks for the heads up, it looks like that importer is missing the Context field, which should be defaulting to “User” rather than “Person”. In your database, can you change the context to User, and you should see it show up. I’ll see that we update that importer for v24. For now, it’s probably best to use the Add button to add new custom fields rather than the importer, so that you can make use of the headings and other settings that are new.
Hi Sandra. Thank you it worked. Please also include the “heading” column of table gibbonCustomField in addition to column “context” in the importer.
Good day. For the Custom Fields Data import, is there a way to have one usersCustomData.yml that has information for both Staff and User? Was successful in importing Staff custom fields and User custom fields but I had to edit the usersCustomData.yml file before every import. Here are the steps that I followed:
- Edit usersCustomData.yml for staff custom fields (table: gibbonStaff, primaryKey: gibbonStaffID, staff custom fields)
- Import Staff custom fields
- Edit usersCustomData.yml for user custom fields (table: gibbonPerson, primaryKey: gibbonPersonID, user custom fields)
- Import User custom fields
I tried combining them using concatenation but only the fields on the topmost were available for importing.