Data source not available in preview

08-11-2022 11:36 AM
New Contributor III

Experience Builder Dev Edition 1.8.0

I have a custom widget where I use DataSourceManager to access a specific data source.  The odd thing is all my code works fine when I use the Live View mode in Exp Builder but fails when I preview the app.

When I console DataSourceManager.getInstance() in Exp Builder I can see my data source in the DataSources object but when I do that in preview the data source is not there.

Is there something I need to do to force the data source to be available in preview?

0 Kudos
1 Reply
New Contributor II

@Danik-B Do you use DataSourceComponent in your widget?

In builder, all data sources will be created automatically for the convenience of changing data setting. However, in preview, only data sources which are used will be created.


0 Kudos