Is it possible to give inputs to a callback function which is inside another callback? In the below example I need to process each of the dict_item['Name'] which is getting passed from the outer call back function in a for loop.
# Outer Call back
@app.callback(dash.dependencies.Output('dummydiv','children'), # Dummy Output
[dash.dependencies.Input('interval1', 'n_intervals')], # Interal Triger
[dash.dependencies.Input("table", "data")]) # dcc.Store which stores values
def use_table(n, data):
for dict_item in data:
@app.callback(dash.dependencies.Output('lable1','children'), #Output to print the values in a llop
sn = s_name
return sn # Return "Name to Print" to id "Lable1"
return "" #Dummy String - Print Nothing to id "dummydiv"
Unfortunately, I am not able to pass the input parameter to the inner call back function. It returns the below error.
oh, I am very sorry for not explaining it clearly.
lable1 is just an header component. Like this html.H1(id='label1', children='').
I have a table which stores certain data, in which one of the columns is Name. I just want to loop through the data store and show the names in the output component having id lable1. Of course this repeats after certain interval of time hence using the Input component interval1.
I do not want to display all the names that exist in the rows of the table at once or as a list, instead I need to display one name at a time. Assume that that column “Name” consists of 5 names, So after say 1 minute I need to loop through and display each of the 5 names(Display only one name at a given time).