08-24-2023 09:18 AM - last edited on 08-24-2023 10:16 PM by JackLacava
I have a dashboard with a button component in which I have a XFBR String which alternates between two colors for the button's image background when clicked.
Similary, I would like to be able to alternate between two images for my button when clicked. Is this possible with a XFBR String at all ? I thought I could return the image's file name with a XFBR String under Image URL Or Full File Name
or can XFBR Strings only be used under Display Format ?
Solved! Go to Solution.
08-24-2023 02:41 PM
08-24-2023 10:07 AM - edited 08-24-2023 03:32 PM
One way to go about this is to create two identical embedded dashboards each with a button having a different image.
in each button, if this is a toggle thing then make the other button's dashboard visible and its dashboard hidden.
You can use also BR logic, and a parameter in the button or dashboard properties.
08-24-2023 02:41 PM
You can use an XFBRString to swap the image:
08-25-2023 04:22 AM
Hi Eric,
Thanks for your solution! I've tried something similar but for some reason I'm always getting the below error:
For my set up, I made a parameter to store the image and use it on my button via a XFBR String:
I have set up the button as below:
My BR should simply return the literal value of the parameter.
08-25-2023 06:43 AM
Try placing square brackets around your parameter, i.e. image=[|!Btn_Image!|]
08-25-2023 08:25 AM
Thanks everyone - @EricOsmanski 's method worked fine, it seems that I was pointing to an incorrect/non-existant file, hence the "key was not present in dictionary" error