Using a raw list datasource for Table Edit options

I have an App where I want to update values in a column of a table by selecting from a list of predefined values.
I created a raw datasource as follows:

{
  "id": "raw_action_item_status",
  "origin": "raw",
  "config": {
    "schema":"list",
    "data": ["OPEN", "REFUSED", "FIXED"]
  }
}

In my table element definition, I have editing configured as follows:

"editing": {
  "edit": true,
  "add": true,
  "delete": true,
  "valueOptions": [
    {
      "column": "status",
      "source": "raw_action_item_status",
      "valueColumn": "data"
    }
  ]
}

Unfortunately, the values from the list don’t show up in edit mode, instead, the previously displayed value in the “status” column (“OPEN” for all elements) gets blanked out.
It might be caused by the “valueColumn” definition which was a guess of mine. the raw datasource in fact does not have columns since it is a list…

It might be that your ““data”: [“OPEN”, “REFUSED”, “FIXED”]” is the issue.
Here an example for a raw datasource configuration I used for the same purpose as yours and this one worked for me.

{
“id”: “rate_fpt_1x_number_of_users”,
“origin”: “raw”,
“config”: {
“schema”: “table”,
“data”: [
{
“label”: “Used by users”,
“rate_fpt_1x_number_of_users”: “Few users”
},
{
“label”: “Used by users”,
“rate_fpt_1x_number_of_users”: “Some users”
},
{
“label”: “Used by users”,
“rate_fpt_1x_number_of_users”: “Most users”
},
{
“label”: “Used by users”,
“rate_fpt_1x_number_of_users”: “All users”
}
],
“filterOptions”: {
“enabled”: false,
“distinctValues”: false
}
}
}

And here the config at the element table:

“valueOptions”: [
{
“column”: “rate_fpt_1x_number_of_users”,
“source”: “rate_fpt_1x_number_of_users”,
“valueColumn”: “rate_fpt_1x_number_of_users”,
“labelColumn”: “rate_fpt_1x_number_of_users”,
“allowNewValues”: true,
“syncSets”: []
}, …

Using an FRT source now.

Still, I don’t get the options displayed correctly.
I still can enter anything I want and get no autocompletion/dropdown whatsoever.
I also noticed that “column” in “valueOptions” seemingly needs to be the label and not the column name…

Maybe give this config a try:

{
“id”:“raw_action_item_status”,
“origin”:“raw”,
“config”:{
“schema”:“table”,
“data”:[
{
“status”:“OPEN”
},
{
“status”:“REFUSED”
},
{
“status”:“FIXED”
}
]
}
}

and…

{
“editing”:{
“edit”:true,
“add”:true,
“delete”:true,
“valueOptions”:[
{
“column”:“status”,
“source”:“raw_action_item_status”,
“valueColumn”:“status”,
“allowNewValues”:false,
“syncSets”:[
]
}
]
}
}

1 Like