Custom style for events

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 8
Joined: Sun Sep 01, 2013 9:55 am
PostPosted: Mon Sep 02, 2013 6:12 am
I'm a long time user of SeedCode Complete and for some simple applications I use only the Calendar.

For some events I need the hour/summary/description to show as strike through in the day/week/month portal.

I did a search for "text" with some possible variations but couldn't find an answer.

Is this possible, and if yes, where to insert it.
The strike through is a condition in the linked application from where I push the data in the calendar.

TIA
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Mon Sep 02, 2013 7:45 am
Hi Monty,

You can use the TextStyleAd() function to format text as strikethrough, the only trick is where to do that. If it's the time display you want to strike, then we have a script just for that. =)

Edit the script "Format Event Time --- Edit Time Formats for Events Here ---" and edit the last scrip step in that script: it's a long calculation that formats time in 12 or 24 hour format in the different calendar views. To strike time, find the string...

Code: Select all
TextColor ( $sc_time ; $sc_colorfortime )


...and change it to:

Code: Select all
TextStyleAdd ( TextColor ( $sc_time ; $sc_colorfortime ) ; Strikethrough )


If you want that to only happen in some cases, you'll need to create an if statement around the time like this:

Code: Select all
If ( 1=2 ; TextStyleAdd ( TextColor ( $sc_time ; $sc_colorfortime ) ; Strikethrough ) ;TextColor ( $sc_time ; $sc_colorfortime ) )


When it comes to writing your test you have access to all the fields about an event that we're pulling into the calendar, so you can use any of the following variables in your test:

$$c_Color (the status, like "Begun")
$$sc_Mode (the current calendar view. more here: http://www.seedcode.com/pmwiki/index.ph ... heCalendar )
$$sc_Resource
$$sc_DateTimeStart
$$sc_DateTimeEnd
$$sc_Summary
$$sc_UUID
$$sc_SourceInUse

If you need test other facts about the event that the script doesn't have access to yet (facts about related records, the status of that event's invoice, etc. that aren't represented in the $$vars above) we'd probably do that with SQL. If that's not something you're familiar with, grab an implementation package and we can help you modify the script so it can query other fields / records via SQL when it's deciding to strike through the time or not. Implementation packages are here: http://www.seedcode.com/implementation-packages/

Hope that helps,

John
John Sindelar
SeedCode
Posts: 8
Joined: Sun Sep 01, 2013 9:55 am
PostPosted: Mon Sep 02, 2013 8:16 am
Hi John,
thanks for your reply.

I will try it out next weekend when everyone is out of the app.

Will report back as soon as possible.

Respectfully.
JM

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 3 guests

cron
(855) SEEDCODE
[email protected]
Follow us: