V25, Error importing Data in Custom Fields

Hello All,

I am using Gibbon from sometime.Being a beginner I am facing a problem which I unable to resolve . I need help in importing files for Custom field created , by Following the thread comments in the community , I still got no luck.If any one can help to resolve the problem , it would be great.Thanks in advance.
I am attaching screenshots of my screen -Error report while importing .
I am using version 25 Gibbon.

Regards
Om Verma

Hi Om Verma, my apologies for the wait to recieve support, it’s been a hectic time at my school, as I’m also a teacher on top of maintaining Gibbon :sweat_smile:

I’ve had a look at your screenshot, which is helpful to identify the issue, thanks for sharing it. The gibbonPersonID field is a very special database ID used by the system. It looks like you’ve provided a username for this field, rather than a valid gibbonPersonID, which is why Gibbon is giving and error. Gibbon can accept usernames, but it depends on the setup of the import time. If you can share your YML file, I can likely suggest changes to help make this work.

It also looks like Gibbon is attempting to do an INSERT action which is likely not your intent to create new users. Be sure to select Update Only from the import page when configuring your import.

Dear Sandra,
I, too am using v25, and am having difficulty importing Data into Custom Fields. I am struggling to customize Gibbon for our institution. Working with one of the administrators, I imported a large spreadsheet of student data. (I foolishly imported data for almost 2,000 students, instead of a small sample!) This data does show up under User Admin > Manage Users.
I then managed to import some Custom Fields which show up at the top of System Admin > Custom Fields as User Fields and also in System Admin > Import from File as shown in this screenshot:


I had first uploaded them without specifying “User context”. It is when I uploaded them the second time that they appeared. These custom fields also appear as “Other information” at the end when editing a user in User Admin > Manage Users along with their dropdowns.
The problem is that I have failed to import the data for the custom fields from a file. Here is a screenshot of the errors:

Here, too is my usersCustomData.yml:
details:
type: usersCustomData
name: Custom Fields - User Context
desc: Data for user custom fields (Included as an example)
category: Custom Fields
table: gibbonPerson
modes: { update: true, insert: false }
access:
module: User Admin
action: Manage Users
primaryKey:
gibbonPersonID
uniqueKeys:
- gibbonPersonID
table:
gibbonPersonID:
name: “Person”
desc: “Username or Email (if unique)”
args: { filter: nospaces, required: true }
relationship: { table: gibbonPerson, key: gibbonPersonID, field: username|email }
RegNo:
name: “RegNo”
desc: “Registration Number”
args: { filter: string, readonly: true, required: true, serialize: fields }
CandState:
name: “CandState”
desc: “An example of another custom field.”
args: { filter: string, readonly: true, required: true, serialize: fields }
FullName:
name: “FullName”
desc: “An example of another custom field.”
args: { filter: string, readonly: true, required: true, serialize: fields }
FundingSource:
name: “FundingSource”
desc: “An example of another custom field.”
args: { filter: string, readonly: true, required: true, serialize: fields }
ProgLevel:
name: “Program Level”
desc: “An example of another custom field.”
args: { filter: string, readonly: true, required: true, serialize: fields }
ProgCategory:
name: “Program Category”
desc: “An example of another custom field.”
args: { filter: string, readonly: true, required: true, serialize: fields }
fields:
name: “Custom Fields”
desc: “”
args: { filter: customfield, serialize: fields, custom: true }

Any help will be greatly appreciated!!

Hi @Amooti The importer is using the settings from the Custom Fields you’ve created to validate the values you’re importing. It looks like, in creating your Custom Fields using an imported file rather than through the interface, that you’re missing the “Options” settings for these fields. For example, RegNo appears to not have a character limit specified and is defaulting to 0 (the “Expected: Text (0 chars)” error). See if you can edit RegNo and add your character limit under Options. For dropdown fields, the imported values should be in the comma-separated list of valid Options (the "“Expected: Options” error). After updating your custom fields settings, you should be able to import your data and it will be detected as valid.

Thanks for your reply, Sandra! Let me work on it and report on the outcome!

Dear Sandra,

Thanks very much! The problem seems to have been solved by following your advice.

After making the initial corrections, I still got a smaller number of errors, but I eventually was able to realize that the data in the imported table in two columns was all in capital letters, but the choices for the Dropdown list were just with initial capitals. When I changed the choices for those particular columns to all capitals in the Dropdown list, the import went without error.

I am very grateful!

1 Like