Colorcoding an appointment in calendar
Hi there,
I am trying via "show as" in the appointment field to colorcode the appointment with no success. I have in the employments table created a choice field where the color show which kind of worker it is. I have it to work in a formula field, but when truing to do it in the appointment field in "show as" I fail - any idea of how to do it ?
the formula field looks like this :
let Xcol := 'Who should do the job'.Colorcode;
Xcol
and the clot turns to the color of the worker.
The appointment "Show As" looks like this :
let Xapp := 'Who should do the job'.Name + " " + text('Appointment Time');
if 'Who should do the job'.Colorcode = 1 then
let Xcol := "green";
void
else
if 'Who should do the job'.Colorcode = 2 then
let Xcol := "blue";
void
else
let Xcol := "red";
void
end
end;
styled(Xapp, "Xcol", "")
but even what ever it remains blue. And preferably I would like the switch function as it will later be 6 colors.
Really appreciate some help here.
Thanks
Leo
2 replies
-
this works for me:
switch mC do case 1: styled(text('Rich text'), "green") case 2: styled(text('Rich text'), "blue") end
mC is a simple choice field.
Rich text is an old (pre 3.13) rich text field. I've put in any field here and it works fine. Just have to make sure you put text() around it if it is not a text field.
Here is the result:
The two entries for Feb 5th and 6th show a green and blue calendar event. The bottom one is an appointment field.
You should look into ' great work with javascript to see if his calendar is more suited for your needs.
Content aside
- Status Answered
- 3 mths agoLast active
- 2Replies
- 37Views
-
2
Following