I'm working on a mod to have multiple lines displayed in the simple view for the Week layout, but running into a few issues and looking for the best fix... I'd like to avoid having a portal inside a portal.
This is the unmodified simple week view were only one line is displayed:
This is the modified simple week view were multiple lines are displayed:
The issue becomes the dead space due to "line one" being used for the week/day number. Obviously I would not want to get rid of week/day numbers, but the way things look my solution would be to have a "one line" portal for the week/day number, then a separate multi line portal (with repeat) for the event data. Any other thoughts on how to do this?
I'd also want to lose the ... and have line breaks. I seem to remember those are in a script somewhere.
Which script do I need to dig into to have simple day show ... while simple week uses line breaks? (like in the non-simple view)
As always thanks for the support.
Multi-line simple view "Week" - Portal in a Portal?
8 posts
• Page 1 of 1
Posts: 40
Joined: Wed Oct 06, 2010 6:49 pm |
|
Hi Max,
You can specify the starting row of a portal, so you could actually have two portals here. One on top that's one row and one line for the day numbers, and then another two line portal right below it that starts on row 2.
Right, that script is: Read iCal Event by Number ( Source ; Number ) where the summary is assigned. hth, Jason |
|
Posts: 40
Joined: Wed Oct 06, 2010 6:49 pm |
Ahhh... but your way makes too much sense I got stuck in late night programer's tunnel vision.
From a script execution standpoint do you see any pitfalls with simply duplicating the existing portal on the simple-week tab and making layout modification as needed? (scripts for new events or changes to existing events, including the drag scripts) I'm wondering about any possible scripts that act upon a "named" tab or portal or field. Thanks |
Right, duplicate (copy and paste) the existing one with all it's fields and then modify. We are naming the Portals: Calendar Portal 2, Calendar Portal 3, etc. but scripts aren't dependent on specific portal names. Duplicating the portal will just maintain this convention (next one should be Calendar Portal 9). The main tab names: Day, Week etc. are important, as well as the ones that denote simple or regular view, so you want to keep those the same, but otherwise you should be good.
-Jason |
|
Posts: 40
Joined: Wed Oct 06, 2010 6:49 pm |
Hmm, everything is great but the separator, I'm only getting the first line of my data. Here's the change I made:
Let ( [ separator = ¶ ; // --------------------- You shouldn't have to edit below this line ----------------------- start = Position ( $sc_Event ; "SUMMARY" ; 1 ; 1 ) ; Line = GetValue ( $sc_Event ; ValueCount ( Left ( $sc_Event ; Start + 1 ) ) ) ; notime = GetAsTime ( $$sc_DateTimeStart ) = 0 or PatternCount ( $$sc_Mode ; "Sched" ) = 0 ] ; // Need to escape returns and pipes in our array Substitute ( Line ; [ "\n" ; If ( notime ; separator ; "¶" ) ] ; // events with no time are shown with return separated summaries on one line [ "\," ; "," ] ; [ "|" ; "/" ] ; [ "\:" ; ":" ] ; [ "SUMMARY:" ; "" ] ) ) |
Hi Max,
Right, you're trying to do this in Simple View, and I lost track of that. When in Simple View, we cut off the top line of the summary, and untangling this in the scripts would be very tricky. An easier approach would be to leave the "...s" in there and then substitute them out for carriage returns in the display calculation field in CalendarRows: CalendarContentReptCalc. Something like this: Let ( [ $row = Extend ( RowNumber ) ; $column = Get ( CalculationRepetitionNumber ) ]; Substitute ( GetValue ( Substitute ( GetValue ( $$sc_ArrayContent ; $row ) ; "|" ; "¶" ) ; $column ) ; [ "\n" ; "¶" ] ; [ "..." ; ¶ ] ) ) Let me know if that gets you closer, Jason |
|
Posts: 40
Joined: Wed Oct 06, 2010 6:49 pm |
Thanks Jason, WORKED GREAT!
Since the tabs are named (Day, Week...) do you see any conflicts if I work in an IF statement so Day can use ... and Week use ¶, or maybe a better approach would be to make an alt version of CalendarContentReptCalc just for the Day version? However I may be able to skip this since the end users are really only planning to use the Simple Week and Schedule layouts. |
Cool! Either way. The If statement should work fine, and you can base it on the global variable $$sc_Mode, i.e. PatternCount ( $$sc_Mode ; "Day" )
Let me know how it goes, -Jason |
|
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests