Best way to view related record in Experience

14205
15
Jump to solution
11-17-2021 11:17 AM
Boyang_Wang
Frequent Contributor

Hi

I am working on an app that shows related records of a selected record. In Web AppBuilder there are several ways to show related records. One is on the popup, one is in Query widget, and one is in Attribute Table widget. 

However, in Experience I do not see a way to show related records. Even the popup does not have "related table" option like in Web AppBuilder. I think it has to do with the difference between classic Map Viewer and new Map Viewer? I am not familiar the new Map Viewer as it is not available in my Enterprise Portal. What are the alternative ways to show related records in Experience?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Set the action in the Map to use the map selection to select corresponding features in your related table, and link them based on the appropriate field.

Set the List to connect to your related table, and then set the view to Selected Features. You'll want to disable the Selected state of the list, otherwise selecting an item in the list would change the selection and mess with the list contents.

jcarlson_2-1637181289746.png

 

jcarlson_0-1637181100332.png

jcarlson_1-1637181210691.png

Regarding your other question, something built in EB Dev would have to be hosted somewhere. We just put ours on our Web Adaptor machine so that we can have a nice URL, like https://maps.co.kendall.il.us/mapviewer for our Experience. Once deployed, you can register the app with AGOL / Portal, in case the application needs credentials to access it.

- Josh Carlson
Kendall County GIS

View solution in original post

15 Replies
jcarlson
MVP Esteemed Contributor

You're right that the related records in the popup are not in the new Map Viewer as of yet, but it's a forthcoming enhancement. But you can certainly still present the data in the meantime. We show related records using a separate List widget for the related table. You can configure the main layer to have an Action tied to it, such that selecting a feature in the layer selects/filters features in the related record list.

There are lots of ways to do it, depending on how you want the end product to look. You might consider using Experience Builder Developer, as it has all the latest additions to Experience Builder that are not yet present in the built-in EB app in Enterprise.

- Josh Carlson
Kendall County GIS
Boyang_Wang
Frequent Contributor

Hi Josh,

Thank you for suggesting List widget. Is there an online tutorial showing how to set it up to show related record? What I want to achieve is clicking on a feature in the map to show the related record in the List widget. Should I setup the action in Map or List widget?

For the apps developed using Experience Builder Developer, can they be deployed in ArcGIS Online or Enterprise Portal?

Boyang

0 Kudos
jcarlson
MVP Esteemed Contributor

Set the action in the Map to use the map selection to select corresponding features in your related table, and link them based on the appropriate field.

Set the List to connect to your related table, and then set the view to Selected Features. You'll want to disable the Selected state of the list, otherwise selecting an item in the list would change the selection and mess with the list contents.

jcarlson_2-1637181289746.png

 

jcarlson_0-1637181100332.png

jcarlson_1-1637181210691.png

Regarding your other question, something built in EB Dev would have to be hosted somewhere. We just put ours on our Web Adaptor machine so that we can have a nice URL, like https://maps.co.kendall.il.us/mapviewer for our Experience. Once deployed, you can register the app with AGOL / Portal, in case the application needs credentials to access it.

- Josh Carlson
Kendall County GIS
Boyang_Wang
Frequent Contributor

Hi Josh,

I just tried it out using List widget. Although it is like redefining the relationship regardless of the feature service definition, it works for me. Thanks!

Boyang

0 Kudos
Boyang_Wang
Frequent Contributor

Hi Josh,

Today I am using your method to work on a many-to-many relationship in experience builder. I have both features and relationship table to three list widgets. I can click on a feature in the first feature class and the corresponding relationship records in relationship table can be selected, but then the corresponding feature in the second feature class cannot be selected, unless I click on the relationship table. It seems that selection by clicking and selection by action are two different things, meaning that selection by action cannot be chained.

jgoldman
Occasional Contributor

Hi @jcarlson,

Thank you for posting this. It seems like it *might* be what I am looking for and I was hoping to possibly ask you a few questions about this method. 

 

Currently, I am attempting to somehow "show" a related feature (within the same map) when one feature is selected in an Experience we are building. The user wants to be able to click on one feature (a project) and be "lead" by the app to the "enabling" project (what I assume would be a related FC) and be able to interact with it (view attribute data of the related project). What is the best methodology to set this up and implement within Experience Builder? Please let me know if I should elaborate further. 

I appreciate your help on the matter as this is the closest thing online I can find to explaining what we may need to do. 

 

Thank you,

 

-Jennifer

Boyang_Wang
Frequent Contributor

Hi Jennifer,

I think the goal you are describing is exactly what Josh was describing: using a List widget for your first project, and a Feature Info widget for your "enabling" project. Then, set up action in List widget so that record selection changes will trigger framework to select data records with action data being the "enabling" project, so that the "enabling" project Feature Info widget will show the project(s) related to your selected project in the List widget.

0 Kudos
VictoriaJadot
Emerging Contributor

Hi Josh,

I've tried to work with this method you explained. Let me show you the steps i did with the help of some screenshots.

First, I set up a trigger on my map as you did:

VictoriaJadot_0-1662562131829.png

Next, I make a list and select 'selected features':

VictoriaJadot_1-1662562174679.png

Next, i put the name of the selected features as dynamic content:

VictoriaJadot_2-1662562285839.png

Now the problem that i am facing is the following: the list doesn't update when clicking on a building, so the trigger is not working. I keep getting the 'No data' sign on my application:

VictoriaJadot_3-1662562542049.png

Important to mention maybe: The S13 buildings layer is a 3D scene layer and the S13_train layer is a 2D feature layer. These two layers are also not in the same web scene, i don't know if this is a problem or not?

Do you know how to make the trigger work in this case? Thank you in advance and best regards,

Mauk

 

0 Kudos
SolanaFoo2
Regular Contributor

I'm having the same issue as Victoria.  Please mark this as unresolved again.  There may be a new bug perhaps?  I'm working with a feature class and related table feature service.  No 3D involved.

Also, it works for me between the map and a table widget where if I select a polygon in the map, the polygon record is selected in the table.  But I had set up the action on the related table and that selection is NOT working in the table widget.