SmartView, display list of IDs

Hello,

I’m trying to use a Smart View to display a list of Users with a specific template.

Expected behavior

To start, I just want to display a simple list of IDs and emails in a table

<div class="c-smart-view">
  <div class="c-smart-view__content">
    <span class="c-smart-view_icon fa fa-{{@collection.iconOrDefault}} fa-5x"></span>
    <h1>
    </h1>
    <p>
      <h1>Liste de clients ({{@recordsCount}})</h1>
      
      <table style="width:100%">
          <tr>
            <th>ID</th>
            <th>Email</th>
            <th>Entreprise</th>
          </tr>
            {{#each records as |record|}}
                  <tr>
                    <td>{{record.forest-id}}</td>
                    <td class="user">{{record.forest-email}}</td>
                    <td>{{record.forest-companyName}}
                         {{button/beta-button
                              type='primary'
                              text='Connect as user'
                              action=(action 'triggerSmartAction' collection 'connect-as-user' record)
                          }}
                    </td>
                  </tr>
            {{/each}}
        </table>
    
    </p>

    <button/beta-button {{action 'fetchRecords'}}>
        Refresh data
    </button>
    

  </div>
</div>

import Component from '@ember/component';

export default Component.extend();

Actual behavior

The email is correctly displayed
The ID is not displayed

Failure Logs

Context

Please provide any relevant information about your setup.

  • Package Version:
"dependencies": {
    "axios": "^0.21.0",
    "chalk": "~1.1.3",
    "cookie-parser": "1.4.4",
    "cors": "2.8.5",
    "debug": "~4.0.1",
    "dotenv": "~6.1.0",
    "express": "~4.16.3",
    "express-jwt": "5.3.1",
    "forest-express-sequelize": "6.7.6",
    "morgan": "1.9.1",
    "pg": "8.5.1",
    "require-all": "^3.0.0",
    "sequelize": "6.5"
  }

Hi @gaelperon,

Did you try record.id (instead of record.forest-id)?
I think it is the way to go. The id must not be prefixed by forest for this specific field.

Does it help?

Yes, thanks. It works