# No data returned for table and no callbacks triggered

**URL:** <https://community.plotly.com/t/no-data-returned-for-table-and-no-callbacks-triggered/41879>\
**Category:** Dash Python\
**Created:** [July 2, 2020, 2:22am UTC](https://community.plotly.com/t/no-data-returned-for-table-and-no-callbacks-triggered/41879 "2020-07-02T02:22:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ziczac](https://avatars.discourse-cdn.com/v4/letter/z/a88e4f/32.png) [@ziczac](https://community.plotly.com/u/ziczac)\
**Post date:** [July 2, 2020, 2:22am UTC](https://community.plotly.com/t/no-data-returned-for-table-and-no-callbacks-triggered/41879/1 "2020-07-02T02:22:43Z")

</div>

I am trying to use selected\_row\_indices in a callback, following a bunch of examples from the forum. But clicking on the cells does not trigger any callback and the initial callback when loading the page as well as callbacks triggered by Intervals will return None as input data

```
import dash_table as dtbl

dfext = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/solar.csv')

app.layout = html.Div([
    dtbl.DataTable(
        id='datatable',
        columns=[{"name": i, "id": i} for i in dfext.columns],
        data=dfext.to_dict('records'),
        row_selectable='multi'
    ),
    dcc.Interval(id='refresh', interval=10 * 1000, n_intervals=0),
    html.P(id='dummy'),
])

@app.callback(
    Output('dummy','children'),
    [Input('refresh','n_intervals'),
     Input('datatable', 'rows'),
     Input('datatable', 'selected_row_indices')])
def f(n, rows,selected_row_indices):
    print(selected_row_indices)
    print(rows)
    return []

```

The callbacks get triggered on the Intervall, but variables printed are

```
None
None

```

versions  
dash==1.13.4  
dash-bootstrap-components==0.10.3  
dash-core-components==1.10.1  
dash-html-components==1.0.3  
dash-renderer==1.5.1  
dash-table==4.8.1

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [July 2, 2020, 3:02am UTC](https://community.plotly.com/t/no-data-returned-for-table-and-no-callbacks-triggered/41879/2 "2020-07-02T03:02:49Z")

</div>

Hi @ziczac  
You’re DataTable id='table\_test but the component id in your input is datatable. Just change one of them so they match

---

<div class="post-metadata">

**Author:** ![ziczac](https://avatars.discourse-cdn.com/v4/letter/z/a88e4f/32.png) [@ziczac](https://community.plotly.com/u/ziczac)\
**Post date:** [July 2, 2020, 7:04am UTC](https://community.plotly.com/t/no-data-returned-for-table-and-no-callbacks-triggered/41879/3 "2020-07-02T07:04:46Z")

</div>

Sorry, that was just a mistake when writing the question. While formulating it I tried it again with exactly that example in one of the other questions in the forum and I did not update all part of the question. so, the names/ids are the same. I editedthe question

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [July 2, 2020, 12:36pm UTC](https://community.plotly.com/t/no-data-returned-for-table-and-no-callbacks-triggered/41879/4 "2020-07-02T12:36:06Z")

</div>

> [@ziczac](#):
>
> ```auto
> @app.callback(
> Output('dummy','children'),
> [Input('refresh','n_intervals'),
> Input('datatable', 'rows'),
> Input('datatable', 'selected_row_indices')])
> 
> ```

@ziczac  
you need component properties that are actual properties of a datatable.  
`selected_row_indices` and `rows` do not exist. Maybe you are referring to `selected_rows` or `derived_virtual_data`.

See [full list of datatable properties.](https://dash.plotly.com/datatable/reference)

There’s a difference between the strings that go inside a callback Input and the arguments that go inside the callback function. For a deeper explanation, read this [documentation](https://dash.plotly.com/basic-callbacks) or see this [tutorial](https://youtu.be/iV51JqP6y_Q).

---

<div class="post-metadata">

**Author:** ![ziczac](https://avatars.discourse-cdn.com/v4/letter/z/a88e4f/32.png) [@ziczac](https://community.plotly.com/u/ziczac)\
**Post date:** [July 3, 2020, 2:42am UTC](https://community.plotly.com/t/no-data-returned-for-table-and-no-callbacks-triggered/41879/5 "2020-07-03T02:42:32Z")

</div>

Oh, thanks. I didn’t realize that this here was not an actual working example

> [@How to get the data of the selected rows of dash-table-experiments?](https://community.plotly.com/t/how-to-get-the-data-of-the-selected-rows-of-dash-table-experiments/8439/2):
>
> You’ll need to use the rows property as input along with selected\_row\_indices. There’s an example at [https://github.com/plotly/dash-table-experiments](https://github.com/plotly/dash-table-experiments). But essentially something like @app.callback( Output('div-out','children'), [Input('datatable', 'rows'), Input('datatable', 'selected\_row\_indices')]) def f(rows,selected\_row\_indices): #either: selected\_rows=[rows[i] for i in selected\_row\_indices] #or selected\_rows=pd.DataFrame(rows).iloc[i] return do\_something

---

<div class="post-metadata">

**Author:** ![chubukov](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@chubukov](https://community.plotly.com/u/chubukov)\
**Post date:** [July 3, 2020, 3:13am UTC](https://community.plotly.com/t/no-data-returned-for-table-and-no-callbacks-triggered/41879/6 "2020-07-03T03:13:47Z")

</div>

> Oh, thanks. I didn’t realize that this here was not an actual working example

@ziczac sorry, that example was for a fairly old version of the datatable – it’s gotten significant refactoring.
