How to display image dependent on select_one answer

665
7
Jump to solution
08-07-2018 08:40 AM
CarlHolt1
Occasional Contributor III

I want to display an image in the survey based off the answer given in a select_one question.

eg: ${structure_type}='Hooded Catch Basin, then it would display 

That way the users know they have selected the correct Stormwater Structure.

Tags (2)
1 Solution

Accepted Solutions
Philip-Wilson
Esri Notable Contributor

Hi Carl,

Do you want to display the image as part of the select_one questions as a reference, if so this is supported and possible. Please see the Media sample available in Connect, as shown below.

Alternatively you can also set the default image for a draw/annotate question type based on a previous answer to a select_one question, see the Photos and Smart Sketching sample for an example of this.

Regards,

Phil.

View solution in original post

7 Replies
Philip-Wilson
Esri Notable Contributor

Hi Carl,

Do you want to display the image as part of the select_one questions as a reference, if so this is supported and possible. Please see the Media sample available in Connect, as shown below.

Alternatively you can also set the default image for a draw/annotate question type based on a previous answer to a select_one question, see the Photos and Smart Sketching sample for an example of this.

Regards,

Phil.

BenBaker1
Occasional Contributor

Would it be possible to just show the image without using an Annotate appearance? I have .jpgs of zoning setbacks, which I want to display only the relevant .jpg based on a previous pulldata() that intersects the location with our zoning service. For example, if the location is within A-1 zoning, the setback diagram for A-1 zoning would display below, without the user having to annotate the image.

0 Kudos
Philip-Wilson
Esri Notable Contributor

Hi @BenBaker1,

You could display the image in a note question if you just want it displayed in the form but not editable, and that can be relevant/calculated based on previous questions.

Regards,

Phil.

ChrisRoberts2
Occasional Contributor III

Hi Ben

Did you work out how to do this vis a pulldata calc?  I would like to so something similar with a selected wetland structure, but dont really want to create a separate note for ech structure.

0 Kudos
BenBaker1
Occasional Contributor

Chris,

I was able to get something close to what I had in mind using the following:

BenBaker1_1-1650574734499.png

The setbacks are pulling from CSVs in the media folder and the image filename is constructed from the zoning plus ".img" to display it in the note. The images are also in the survey's media folder.

The end result looks like this:

BenBaker1_0-1650574541806.png

 

arc_ticodex
New Contributor II

Hi @BenBaker1!

I am also attempting something similar and I was able to chage the display image according to a select_one field using your formula, which was very helpful. However, the image isn't stored in the final feature layer. 

Have you found a way to get around this issue?

Thanks!

0 Kudos
BenBaker1
Occasional Contributor

Hello,

I have not tried to store the image in the feature layer. I have gotten sidetracked on other projects and have not actually started testing the form yet. However, I didn't necessarily want to store the images with each feature layer. I will have to test this, though, because I was hoping to insert the image into a feature report template and I may have the same issues you are having.