How to pre-select data in Experience Builder?

428
4
Jump to solution
07-13-2021 02:16 PM
Corey_Wills
New Contributor II

Hi all,

I am trying to pre-select data for an ArcGIS Experience Builder Web App that I'm making. I want to do this so as to not have a blank area when the user opens the web app. I have attached what currently is the default view as well as what the selected view looks like. 

Two questions:

1. Ideally, there would be function similar to the list widget function where you can choose "Regular" and "Selected" views, but I can't find a similar functionality within either the Image, Text, or Feature Information widgets. Am I missing something? 

2. If this functionality doesn't exist, is there a way to pre-select data in the data source map so that there isn't blank/placeholder data when the user opens the page?

Thanks for any help you might be able to provide with this!

 

0 Kudos
1 Solution

Accepted Solutions
TonghuiMing
Esri Contributor

Hi @Corey_Wills 

I believe your requirement can be achieved by using the View for empty selection feature inside the data source settings (instead of widget setting, since this applies to all places using this data source):

TonghuiMing_0-1626229840872.png

After checking this, the default value to display is the first record. If you want to customize it, go into its setting and use sort or filter to choose the one you want.

See the Select data doc for more details. Hope it helps.

 

Best,

Tonghui

View solution in original post

4 Replies
JonathanMcDougall
Occasional Contributor III

@Corey_Wills 

So, the user interaction is to select an item on the map within your app and see the selected info?

If so, then all you have to do is ensure, within the card you've created, you don't use "Selected Features" but "Default" within the dynamic fields, but you do make sure the data action from the map is to "on select change framework"

I've thrown a field into this screenshot for an example.

Card on the left has fields set to "Selected", the little box on the right is set to "Default" for dynamic fields - Default just brings through a first record, regardless of any selection.

JonathanMcDougall_0-1626215670770.png

 

if I make a selection then you'll see both details change accordingly.

JonathanMcDougall_1-1626215728409.png

This means, as long as the user knows to select data and  isn't put off by always getting a record given to them on open, then all is good.

Me, you'll see on the first grab, I've got the dynamic field asking the user to "Select a Feature". You could think about the way that first experience is shown, and change the wording of the dynamic field. (hope this makes sense?)

0 Kudos
TonghuiMing
Esri Contributor

Hi @Corey_Wills 

I believe your requirement can be achieved by using the View for empty selection feature inside the data source settings (instead of widget setting, since this applies to all places using this data source):

TonghuiMing_0-1626229840872.png

After checking this, the default value to display is the first record. If you want to customize it, go into its setting and use sort or filter to choose the one you want.

See the Select data doc for more details. Hope it helps.

 

Best,

Tonghui

Corey_Wills
New Contributor II

Thank you, Tonghui! This worked perfectly.

0 Kudos
JonathanMcDougall
Occasional Contributor III

We'll perhaps differ on the value of the "View for Empty" - if I were to use it, as I've suggested elsewhere, I'd create a "99999" feature that has attributes that give the user some level of detail, just not the detail of the dataset. I think sometimes it could cause confusion to the user if handed record one (or whatever) as they land - I'd want to manage the make a selection process to see the data.
You don't online shop and start with a basket that already has one item in it.

0 Kudos