Changing column names in List - Simple widget

Mike Hashemi
Kilo Sage

I am building a experience and want to display a list of records. Selecting the "List - Simple" widget, I can add columns, but two of them are references to customer_account and customer_contact, both of which have a "name" property.

 

How can I change the "Same" columns to something like "Customer" and "User", respectively?

 

MikeHashemi_0-1684952195522.png

 

2 REPLIES 2

Riya Verma
Kilo Sage
Kilo Sage

Hi @Mike Hashemi ,

Hope You are doing great.

 

  1. Modify the Widget Instance:

    • Access the properties of the "List - Simple" widget instance.
    • Look for the properties related to customer_account and customer_contact references.
  2. Customize the Column Labels:

    • Find the property responsible for defining the column labels, usually named "columns" or something similar.
    • The "columns" property is typically an array that contains objects defining each column.
    • Locate the objects representing the customer_account and customer_contact columns.
  3. Update the Column Labels:

    • Within the objects representing the customer_account and customer_contact columns, find the property responsible for defining the column label, often named "label" or "displayName".
    • Modify the value of the "label" property to the desired label, such as "Customer" for customer_account and "User" for customer_contact.

please find below code for reference.

 

{
  "widget": {
    "instance": {
      "columns": [
        {
          "label": "Customer", // Modify this label for customer_account
          "field": "customer_account"
        },
        {
          "label": "User", // Modify this label for customer_contact
          "field": "customer_contact"
        },
        // Other columns...
      ]
    }
  }
}
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

I do not see any reference to customer_account or customer_contact (other than what is the screenshot I shared). The rest of the properties are:

 

MikeHashemi_0-1684964642753.pngMikeHashemi_1-1684964669214.png

MikeHashemi_3-1684964697781.png

 

What am I missing?