Select to view content in your preferred language

Data view breaks text in List widget

764
6
09-26-2023 11:47 AM
DougBrowning
MVP Esteemed Contributor

When I add a data view to the List widget it changes from listing the field value to simply saying the name of the field.  The view filter is just a simply if blank.  Is this a bug or am I doing something wrong?  It also does not seem to actually filter anything.

ExBFilterWrong.gif

DougBrowning_0-1695753869988.png

All I want to do is have the List widget on the left to update when a user adds a value on the right.  So the list is all data that does not have a value.  User adds a value on the right and the record is then removed from the List at the left.  But I cannot get it to work.  Adding a filter tool requires the user to manually update.  Basically the user is working their way down the list until the list is clear.  I can do this in Ops Dashboard so not sure what I am doing wrong here.  I tried actions but I do not think that is what I want.

thanks

0 Kudos
6 Replies
JeffreyThompson2
MVP Regular Contributor

I think what you are trying to do should work, but you will need to point the content of your List Widget to Data View 1. 

JeffreyThompson2_0-1695754819365.png

 

GIS Developer
City of Arlington, Texas
DougBrowning
MVP Esteemed Contributor

Well setting it to Default on Text somehow got my POINT_ID to show again.  Seems to be a bug in here somewhere.

But the List widget is still not updating until I refresh the browser.  Is there a way to get it to remove the records from the list widget as soon as I make the edit in the Edit widget?  I would think it should disappear from the List the second I hit Update right?

thanks

0 Kudos
JeffreyThompson2
MVP Regular Contributor

https://developers.arcgis.com/experience-builder/guide/action-triggers/#triggers

I took a look at the triggers that are available to all the widgets. I don't think any of them will do what you want. 

I think the closest you will get OOTB is to set up a filter widget with the same query in your data view and label it 'Refresh list'. 

If you want it fully automated, I think you will need to do a custom Edit and List widget.

GIS Developer
City of Arlington, Texas
0 Kudos
DougBrowning
MVP Esteemed Contributor

Yea its looking like it.  Have you seen any info on when these data views actually update?  Not seeing any triggers from the Edit widget either.  That would do it - Edit widget tells List widget there has been a change so please update the data view for the list. 

DougBrowning_0-1695762194709.png

I am also not seeing any way to use Arcade here to limit the list by the logged in user.  The dream is that the list is just the items assigned to the current user and are not yet complete.  As they are completed they get removed from the to do list.  Simple idea but I am not seeing a way that is not manual.  thanks

 

0 Kudos
JeffreyThompson2
MVP Regular Contributor
  • Data views typically change when some sort of filter is applied so the refresh list button suggestion above should work as expected.
  • In Developer Edition, it is possible to add a custom message action to a widget. It's really just one line of code, but figuring out where exactly to add that line could be a challenge. To go this route, you would need to copy the default Edit and List widgets into your custom widgets. Find the place in the Edit widget where the new feature is created and add your message. In List widget, add an useEffect function to trigger off of the message that causes the widget to rerender. You may need to immediately destroy the message to prevent an infinite loop. 
  • Arcade does not appear to be directly supported in Experience Builder.
  • All widgets have access to props.user which contains all of the portal information on a given user, such as groups and usernames. You could potentially use this to filter what data is shown to a given user.
GIS Developer
City of Arlington, Texas
0 Kudos
DougBrowning
MVP Esteemed Contributor

Thanks.  I ended up changing to a double filter then set the refresh rate on the layer to .1 minutes - which is 6 seconds.  It does update every 6 seconds now so probably about as close I can get.  Its a one time project so not worth custom anything.

Only thing left is trying to figure out where I set this undefined title in the Edit widget.  Tried changing everything I could find in ExB and the webmap.  

DougBrowning_0-1695930207044.png

 

Strangely it shows a value when in the builder editing the project.  Seems common for the editor and published to be different.

DougBrowning_1-1695930271793.png

Thanks for the help

0 Kudos