Hi, is it possible to dynamically set the tile content color yet? I am wanting to create a tile that shows a rubbish bin that is a particular color. Our garbage collection alternates between recycling bins (yellow) and general garbage (red) so want an indicator on the dashboard to remind me which color is being collected each week.
Hi @Ben_Iffland, I hope you don’t mind me moved your post to a new thread as the original thread was specifically about the custom styles/colors based on attribute values in the Hero Tile.
Yes, you can achieve this using a Variable and a rule to update its value every week. See the steps below:
TEXTvariable called “trashType” and set it to this week’s collection type. (ex: General Garbage). You can access the Variable Manager by tapping the drop-down button at right-top in the Rule List page.
Create a rule to be triggered after the trash collection day. (I set it to be triggered at 12am every Saturday, but you can set it to whatever makes sense to you.) Add an IF condition to check the current value of the variable created above and update it accordingly. So this rule will alternate the variable value every week.
Add this variable to the dashboard, edit its style. (You can also set the tap action to “Do Nothing”, so it won’t prompt an input modal when tapped.)
3.1 Add Text States and the color/styles you wanted for each state. So the tile color will be changed based on the variable’s value.
Feel free to let me know if you have any questions.
Great thanks. Thats perfect