I am using the DataSourceComponent to query a feature layer and it is successfully querying it and rendering my content. However I need access additional capabilities not directly supported in Experience Builder from what I can see. The datasource I am getting from the DataSourceComponent appears to correctly be a FeatureLayerDataSource which has an optional property of layer. It seems by default or by my configuration somehow layer is always undefined. Count is also undefined by default but if you set queryCount on the component to true then count is loaded as the documentation indicates. I don't see anything similar for the layer. I've looked at the type definition for DataSourceComponent/DataSourceComponentProps which does show a few more properties than the documentation does but nothing seems to indicate that it would cause layer to be loaded.
Hi tbock
Just wondering if you got a solution to this issue. I am encountering the same behavior, I think.
I have created a custom message action and as such can't use the DataSourceComponent, therefore I am using the raw DataSource objects as my datasources are all derived from the action's settings. I am trying to use a FeatureLayerDataSource based on a layer within a map service and finding that even once loaded the layer property is never populated and always remains undefined. Interestingly, the restLayer property is populated, but it does not meet all my needs. If I wrap the map service in a web map and reference the layer via that web map the child FeatureLayerDataSource does populate the layer property and my action works, however I don't want to have to create web map wrappers to overcome this issue and would prefer to be able to reference the layer from the map service itself.
I also tried pushing a new Javascript API FeatureLayer object based on the FeatureLayerDataSource's url property into its layer property, but this just caused my whole app to have conniptions.
I am using Experience Builder Dev. Ed. v1.12
Is anyone from the Experience Builder product team able to explain this behavior or provide some information about what part of the DataSource lifecycle the layer is/should be populated?
Hi,
I have the same issue. Could you find the solution?
Maybe It can be the solution:
Thanks