Import - custom fields (user context)

Hello, everyone,

I am trying to bulk import a series of custom fields that I have previously created and defined. To do so, I have downloaded the import template in “Data > Import from file > User admin > Custom Fields - User Context”.

However, when submitting the file filled in, it doesn’t recognize the different columns that I’ve created according to my custom fields. Instead, it just shows the original file fields to confirm the import: Person, Example 1, Example 2, Example 3, Custom fields.

Any ideas on what am I doing wrong?
Thank you so much in advance.

Hello again, any help would be much appreciated. This is how I’ve modified the usersCustomData.yml file:

details:
type: usersCustomData
name: Custom Fields - User Context
desc: Import user custom fields (one column per field)
category: Custom Fields
table: gibbonPerson
modes: { update: true, insert: false }

access:
module: User Admin
action: Manage Users

primaryKey:
username

uniqueKeys:

  • username

table:
username:
name: “username”
desc: “Username or Email (if unique)”
args: { filter: nospaces, required: true }
relationship: { table: gibbonPerson, key: gibbonPersonID, field: username|email }

Program:
name: “Program”
args: { filter: string, readonly: true, serialize: fields }

Status:
name: “Status”
args: { filter: string, readonly: true, serialize: fields }

“Project name”:
name: “Project name”
args: { filter: string, readonly: true, serialize: fields }

Location:
name: “Location”
args: { filter: string, readonly: true, serialize: fields }

“Assigned Project Manager”:
name: “Assigned Project Manager”
args: { filter: string, readonly: true, serialize: fields }

Partner:
name: “Partner”
args: { filter: string, readonly: true, serialize: fields }

“Employer name”:
name: “Employer name”
args: { filter: string, readonly: true, serialize: fields }

Phone:
name: “Phone”
args: { filter: string, readonly: true, serialize: fields }

Website:
name: “Website”
args: { filter: string, readonly: true, serialize: fields }

“Human Study Certificate”:
name: “Human Study Certificate”
args: { filter: string, readonly: true, serialize: fields }

“External certificate”:
name: “External certificate”
args: { filter: string, readonly: true, serialize: fields }

Portfolio:
name: “Portfolio”
args: { filter: string, readonly: true, serialize: fields }

Other:
name: “Other”
args: { filter: string, readonly: true, serialize: fields }

Email:
name: “Email”
args: { filter: string, readonly: true, serialize: fields }

Address:
name: “Address”
args: { filter: string, readonly: true, serialize: fields }

However, this is the error that I am getting:

I have made sure and confirmed that the username exist, and all users have been previously created and are a part of my Gibbon system right now.

Thanks again,

Hi @jvalero

Try this for 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  }
    example2:
        name: "Program"
        desc: "Program"
        args: { filter: string, readonly: true, serialize: fields }
    example3:
        name: "Status"
        desc: "Status"
        args: { filter: string, readonly: true, serialize: fields }
    example4:
        name: "Project name"
        desc: "Project name"
        args: { filter: string, readonly: true, serialize: fields }
    example5:
        name: "Location"
        desc: "Location"
        args: { filter: string, readonly: true, serialize: fields }
    example6:
        name: "Assigned Project Manager"
        desc: "Assigned Project Manager"
        args: { filter: string, readonly: true, serialize: fields }
    example7:
        name: "Partner"
        desc: "Partner"
        args: { filter: string, readonly: true, serialize: fields }
    example8:
        name: "Employer name"
        desc: "Employer name"
        args: { filter: string, readonly: true, serialize: fields }
    example9:
        name: "Phone"
        desc: "Phone"
        args: { filter: string, readonly: true, serialize: fields }
    example10:
        name: "Website"
        desc: "Website"
        args: { filter: string, readonly: true, serialize: fields }
    example11:
        name: "Human Study Certificate"
        desc: "Human Study Certificate"
        args: { filter: string, readonly: true, serialize: fields }
    example12:
        name: "External certificate"
        desc: "External certificate"
        args: { filter: string, readonly: true, serialize: fields }
    example13:
        name: "Portfolio"
        desc: "Portfolio"
        args: { filter: string, readonly: true, serialize: fields }
    example14:
        name: "Other"
        desc: "Other"
        args: { filter: string, readonly: true, serialize: fields }
    example15:
        name: "Email"
        desc: "Email"
        args: { filter: string, readonly: true, serialize: fields }
    example16:
        name: "Address"
        desc: "Address"
        args: { filter: string, readonly: true, serialize: fields }
    fields:
        name: "Custom Fields"
        desc: ""
        args: { filter: customfield, serialize: fields, custom: true }

Let me know if you have any questions.

Tieku

Hello, @tiekubd

Wow, thank you SO MUCH for this - it solved the problem. I had really reached a dead end and couldn’t find the solution. Again, really appreciate it the support.

Best,

1 Like