Widgets can interact with each other through related callback IDs, see Configure widget interaction. By using callback IDs, if you click a widget, data of a widget with the corresponding callback ID will change accordingly.
Set a callback ID
For instance, if you click a scattered point in a map, click a row in a list, or select a time point on a time table, the system temporarily stores the designated callback ID, for example, name, into the name variable.
Set variable input
select :name as value select A from table where year = :name
If you are using an API data source, the system directly assigns value to the variable parameters with the same name.