Agenda

This is a tutorial for a simple, yet feature-rich agenda.

It uses stack groups to display the correct events' information based on their index.

You can set it to show just events from today, or as many upcoming events as you want/have.

Upcoming Events

Calculation is based on a stack of event groups. Each event group is a vertical stack group containing 5 horizontal stack groups.

Global Formulas

For the index of en event group create a text global:

gv(event)

$si(mindex, 2)$

For the events' info, create text globals with these formulas:

gv(date)

$df(MMM d, ci(start, gv(event)))$

gv(title)

$ci(title, gv(event))$

gv(info)

$ci(desc, gv(event))$

gv(period)

$if(ci(allday, gv(event)), "All day", df(h:mma, ci(start, gv(event)))+" - "+df(h:mma, ci(end, gv(event))))$

gv(location)

$ci(loc, gv(event))$

Making the Group

  • Make a vertical stack group;

  • in it create 4 horizontal stack groups;

  • inside each stack group add a regular text linking it to one of the global formulas above.

Just copy and paste the vertical stack group as many times as you like and the events will be generated automatically.

Improvements

Hide groups with no details, view events in calendar.

Hiding the groups

To remove the info group, when the event doesn't have a description, use this formula for the visibility of info groups:

HideInfo

$if(ci(desc, si(mindex, 1))="", REMOVE, ALWAYS)$

To remove the location group, when the event doesn't have a location specified, use this formula for the visibility of location groups:

HideLoc

$if(ci(loc, si(mindex, 1))="", REMOVE, ALWAYS)$

To remove the date group, when multiple events are on the same date, use this formula for the visibility of date groups:

HideDate

$if(df(YDDD, ci(start, si(mindex, 1)))=df(YDDD, ci(start, (si(mindex, 1)-1))), REMOVE, ALWAYS)$

To remove the whole event group when that event doesn't happen today, use this formula for the visibility of event groups:

HideEvnt

$if(df(S) < df(S, ci(end, si(mindex), a0d)) + 0, ALWAYS, REMOVE)$

This formula was written by Redditor u/Kyokenshin, special thanks to him.

Tap on an Event to Open it in Calendar

Add a touch action to the Event group:

  • Action = Open link

  • Url = $ci(url, si(mindex))$


Copyright (c) 2021 Erik Bucik

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

BSD-3-Clause

Kustom formatted version