1

I’m running into an issue where a table widget I’ve defined in Slate does not show the values for one column that’s present in the input data being fed into it. For context, it’s called “Num. Employees”, as shown in the screenshot below.

enter image description here

The table widget’s input data is defined by a function that returns a JSON object as shown below. You’ll see that the “Num. Employees” key does in fact have values associated with it, so it’s odd that they are not shown in the table widget.

return {
    "a": [1,1],
    'b': [2,2],
    'Num. Employees': [3,3],
    'c': [3,3]
}

1 Answers1

2

The issue that you’re facing is caused by the fact that periods in JSON keys are not handled gracefully. If you remove the period within your function (i.e. define your column as "Num Employees" as opposed to "Num. Employees"), the data should show up in your table. In other words, your function should look like the following instead:

return {
    "a": [1,1],
    'b': [2,2],
    'Num Employees': [3,3],
    'c': [3,3]
}

Side note - you can still configure the table such that the period in “Num. Employees” is shown! To do so, you must specify a column title that differs from the column ID using the table widget’s configuration panel. An example is shown in the screenshot below.

enter image description here