Skip to main content

Example of Common Scenarios for Data List

Display Row Numbers in Data List

1 When the pagination method is click-to-load-more or scroll-to-bottom-load-more

Index component binding property $w.index_listView1+1

2 When the pagination method is pagination

Index component binding property `$w.index_listView1+1+($w.listView1.pageNo-1)*$w.listView1.pageSize

3 Custom concatenation of row numbers, for example, concatenating '00' before the row number. The expression can be written as 00${$w.index_listView1+1+($w.listView1.pageNo-1)*$w.listView1.pageSize}

Converting Data List Time Fields to Standard Time Format

Convert the system creation time field creatdAt to the standard time format. You can use the expression $w.DateText($w.item_listView1.createdAt, 'YYYY-MM-DD HH:mm:ss')

Data List Enum Field Conversion

Enum fields use the expression `$w.app.utils.formatEnum($w.item_listView1.mj, 'xb', $w.app)

Note

$w.app.utils.formatEnum(key, code, $w.app) Parameter description:

  • key corresponds to the option set option identifier.
  • code corresponds to the option set identifier.

Configuring Association Queries for Data Lists

You can refer to Configuring Association Queries for Data Lists