Wait for data source to load before triggering an action

#1

What “trigger” should one use in c3ui “behavior” in order to wait for a page’s data source to complete loading?

Alternatively, is there another way to wait for data source to load before executing further actions?

0 Likes

#2

you can use the "trigger": "loaded" trigger to wait until a given dataSource has loaded to start an action.

{
    "query": "MyDataSourceId",
    "trigger": "loaded",
    "action": {
        "type": "ActionAfterDataLoaded"
    }
}
1 Like

#3

I was also able to do it through pure javascript:

dataSource.on('loaded', function () {
    //execute follow up actions in here
})
0 Likes