I’m stumped right now. I am toying with the calendar and am trying to figure out how to change the colors of calendar events. I checked the “dynamic color…for event” box and read the reference documentation and it states that each color should be stored as a HEX code in the database, but am at a loss. I tried creating a new thing called ‘color’, and a new type ‘#FF0000’ for red and then set it’s type as color but the event remains blue. Also below the dynamic color check box it has a dropdown called event color field which only lists all my created types and something called unique id. Am I missing something? LOL
Hi @atroche1978 Here is an example in the forum app:
You would include the HEX code as a field within your Event Data Type (CalendarEvent here). It could look something like this
Then in the Calendar Element you would check the box:
(“Color” is the field within CalendarEvent which contains the hex code. Make sure to use the # sign when entering this into an Input or when you type directly into the App Data) and it should work!
I’m doing everything as you instructed and when I save an event by pressing either colored button the event colors do change but resort back to the original color.
Did you type in a new HEX code into the input? The app data says those fields are empty for the entries you created:
Here’s how the ‘Test’ CalendarEvent looks:
I looked at the database, workflow, and elements on the page you sent me. still a bit confused. from what i understand, (example) i have to create a new thing called ‘color’, and then in the field name i have to input the HEX identifiers for each color? and how about for field types, ie text, date, number, user, etc…?
You can create a thing called Color. A Color would have a few fields, like this:
- Name (type is text)
- Hex Value (type is text)
You could manually populate the database with a few of your favorite colors. Here’s an example:
- Awesome Pink
Then, on the event creation, you could have a dropdown named "Color Picker"that shows available colors. In the example posted, there is simply an input field for Hex value. You would replace that with a dropdown of the colors you specified. When the “Create Event” button is clicked, you would create a new calendar event, just like you do right now. The only difference is where it says “color” in the workflow, you would say, “dropdown Color Picker’s value’s Hex Code”
That should do what you’re looking to do.
I updated that page in the ForumApp to use the dropdown. The only color that works is Awesome Pink, cuz the other colors don’t have a hex code applied to them yet.
looking at the first option you gave, i would first create a ‘custom data type’ called ‘colors’. Then under ‘create a new field’ I input the HEX code into ‘field name’, then input ‘text’ into the field type? am i understanding correctly?
Yeah, you can see how it’s set up on the data tab in the link above.
The “thing” is a Color. Colors have Color Names (red, blue, yellow, etc.) and Hex Codes (#ff0066, etc.) Color Name is a text, and so is Hex Code.
so use the HEX code instead of the color and set it to text. I did that. but my calendar events are not changing colors. do i need to set a condition somewhere? and for every HEx code that i input under thing ‘color’ i set it to text?
sorry for all the questions. ive been trying to figure this out all day. literally all day. since 11:30 am EST.
The best practice is to simply give an real open example so people can play and fix your need.
Are you using the forumapp link posted above? It’s working exactly how it should in that link. If you need more help, I definitely recommend sharing the link to your app so others can poke at it.
Yeah. With the help of everyone who responded I got it working. Thanks to all.
Is it possible to pull the hex code from a deeper level?
eg. This Events>Option Sets>Colour (Text)