Select to view content in your preferred language

Displaying Multiple Images in List Widget

341
1
11-20-2024 01:22 PM
LoganCaruthers
New Contributor

Hello Everyone!

I am currently building an experience builder for a grant program. The grant project allows for companies to make upgrades at their facilities, which we have taken pictures of the upgrades installed at these facilities. I have a list widget that displays information about each facility we have awarded grant money too alongside an image widget, which I would like to display the images we have taken of the upgrades. Right now I am able to display one image we have taken for a particular facility, but would like to show all the images we have taken.

I could separate the images into multiple columns and add multiple image widgets to the list, but for some project there are more images than others, so doing this would create empty image widgets for some of our projects. Say I have four image widget, but only three photos for a facility... the last image widget would be blank.

Is it possible to use one image widget to show multiple images, so the viewer can click through and see all the upgrades the facility has made? and if so how? 

If the experience builder does not natively do so, would building a custom widget help me out? ( I have no experience creating a custom widget) 

Thank you for all the help in advance!

0 Kudos
1 Reply
Allen_Zhang
Regular Contributor

The data structure is a one-to-many relationship: one facility to many upgrading photos.

So I think it's better to store facilities and photos in two feature layers/tables, and link the photos to its facility with a "facilityID".

With the two related feature layers/tables:

1. Create a "facility list" and a "photo list".

2. Add a "selection change" message action to the "facility list" which filters the "photo list" with the selected facilityID.

0 Kudos