Displaying image when button "clicked"

Hi Pros,

This might be a stupid question, but for the life of me, I can’t figure it out. I want to display a certain image from the database based on a category button that’s clicked by the “current user”

I used a condition in the image element to display dynamic image when this button is “pressed” but it turns out, you literally have to be pressing the button to have the image show :laughing:, I don’t understand why when “clicked” is not an option. I tried creating a workflow… but being a newb i couldn’t get it to work. Please help.

Billy

Screen Shot 2020-12-28 at 10.34.03 AM

you could create a custom state and use that as the conditional and create a workflow to set the custom state from the button press.

Have the custom state be a text or create an option set to refer to the choices (history etc.) and make the buttons of type option set and make the conditional of type option set to make it easier to manage and avoid mistakes with text.

2 Likes

Hey boston,

Thanks for the help. I tried your solution. I have just one issue. It works in the first instance, and when I click back on another button that has been clicked the states won’t change. For example, when I click “history” it shows correct file, and then if I click “test scores” it shows the correct file, but when click back on “history” it won’t change and stays on “test scores”. Is there a way to reset the states between clicks?

Many thanks,
Billy

Just set a blank state to reset

Yes, as cmarchan mentioned you could just set a blank state when you click the back button. Another alternative is to set to a default value…if using the option sets method create an option that is ‘default’ and set the state to that option on back button.

You could consider having a default image displayed that says something like ‘choose an image’ which is always displayed when the custom state is either blank or ‘default’.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.