Datasource/dataview issues

06-08-2022 09:41 PM
Labels (2)
New Contributor III

Hi ExB Gurus

Another few related questions I hope someone can help me with.

I have an app that has a map widget with a web map datasource. I have also created a dataview off a layer in the map's datasource, to be filtered and act as a view of a current feature. The app also has a table widget and a few card widgets The table widget is configured to use the dataview as its data source and the card widgets have some datasource linked text widgets registered with the dataview.

1. Now my app programatically creates a new feature in a new branch version. The code also updates the queryParams on the dataview to filter to only the newly created feature. The card widgets successfully show the attributes of the new feature from the dataview. Good so far. However the table widget does not show the filtered record. I have tried clicking the refresh button in the table widget, still no record shown. If I switch to a different table in the table widget and back again, the record then shows. How do I programatically get the table to refresh to show the new record. Should I be configuring a message action to trigger the update in the table? I can only see a record selection trigger on the map table widgets? Do I need to programatically trigger a render on the table widget from my process?

2. I also have a widget that programatically updates some attributes of that current feature. Whenthis function is run (and the record is shown in the table widget by switching tables), the updated attributes automatically appear in the table, however, the card widgets do not show this update. So how do I get the cards to update programatically? The data linked text widgets don't seem to have any message actions available to them.

In both of the above cases I am using the Javascript API applyEdits function on the feature layer, extracted from the dataview datasource, with addRecords object for the 1st case and updateRecords object for the 2nd case.

3. For the 2nd case above, I use the dataview's datasource.getRecords() function to get the feature to be updated, I have noticed that whilst I can successfully get the feature attribute object via the getDatabeforeMapping function, the getGeometry function on the same record always returns null. The record definitely has a geometry (it can be seen on the map, it can be zoomed to, etc.). Is there a known bug with returning the geometry for a feature from a datasource? Any ideas how I can get the geometry?


Apologies for piling 3 issues into the one question but they are all related to each other.

Thanks in advance for reading through this and any help offered.


0 Kudos
0 Replies