Panorama X calendar from database entries

I see that it is possible to create Calender “monthly blocks” with the Constructor – but have not found how to fill the calendar with dated entries (e.g, birthdays) from a database. Is this possible?

Panorama X does not have any way to set up repeating calendar entries like a birthday.

Thanks for the information.

If you can fill the date matrix cell then you just need to setup a trigger to fill the cell. So you have a database of repeated dates - just month/day/event. And possibly an event (repeat) interval like from M/D/Y to M/D/Y and maybe some designation like weekly or monthly - Lots of variations.

I’m guessing your calendar will be displaying a whole month or a whole week. At the time you trigger the display of the calendar, I’m guessing you also know the M/D/Y interval it’s displaying. Given that, in the process before it’s displayed, you can look at your “Repeats” datafile for events that fall within the display interval. With them selected, you step down those records, loading the events into the appropriate matrix units.

In other words, you build the calendar “on the fly” and while “flying” you load the appropriate events pulled from your Repeats database. In the past, Panorama was so fast (“How fast was it?”) that it seemed all that activity would take place within an eye blink.

So let’s say your calendar is showing January and you click an arrow button to move it to February. As part of that button click routine, you query the “repeats” database for any events in Feb (within the duration interval of the repeat) and put them in the appropriate cells.

To the user, it just seems like a button click. But there’s a, as Jerry Lee Lewis says, “whole latte shaking goin on”

Thanks. I have been spoiled with 4D and a calendar plug-in, but it sounds like this could make it work within Panorama X.

If a database had something simple like:

EventDt         Event            Private
02/01/2021      Wash Car
02/10/2021      Paint House
02/10/2021      Buy present      X
02/10/2021      Read Book        
02/15/2021      Buy Groceries

How would a Matrix Cell be configured to then display these events in the appropriate box on a calendar?

Within a Text Display object in the cell, you can use the calendardate( function to find out what the date is for that cell (or zero for boxes that don’t correspond to a date).

Once you have the date, you can use lookup(, superlookup( or arraybuild( to extract the data from the database, using the date returned from the calendardate( function as the key. There was an example of this in the Panorama 6 documentation, it works the same. (What is different is that Panorama X does not have a reminder field that allows recurring events. But for non-repeating events, it works the same.)

Knowing the month, you know if the month has 28, 30, or 31 days. Or you can just build a 7 x 5 matrix and partially fill it. Remember your calendar math - every 4 years a leap year. But no leap year if it’s a century and not divisible by 400 - stuff like that.

I believe with Panorama’s calendar math, it’s possible, for a given date, to determine which day in the month it is. That day is your index to the matrix cell. So populate your cell’s text object with the activities for that day, using the date to give an index that determines which cell it is.

I wrote something like that in Pan 5 (or earlier!) days. But it’s been a long time since I’ve visited such endeavors.

It’s kind of the opposite of that. You start with the matrix cell number, which you can get with info(“matrixcell”). Then you can use the calendarday( function to convert this number into what day of the month that is, which tells you what number to draw in the box (or zero if this box doesn’t contain a valid day). You can use the calendardate( function to convert the cell number into a date, which you can use with lookup(, superlookup(, arraybuild(, etc.

There is a multi-page write up of how to make a calendar in the Panorama 6 documentation, which can still be downloaded from:

So far, this topic hasn’t made it into the Panorama X documentation.

Yeah - what he said. :grinning:

For a calendar, there will sometimes be multiple items on the same date.

How can I exclude those events that have a Private field marked while including all others?

If a database had data like:

EventDt         Event            Private
02/01/2021      Wash Car
02/10/2021      Paint House
02/10/2021      Buy present      X
02/10/2021      Read Book        
02/15/2021      Buy Groceries

A LookupAll( can collect the data from a single field, (ie. Event) into an array for display but will include the Private event.

Using LookupSelected( works if I first select those records that are not marked Private but then the result is only the first record instead of an array of records.

I am imagining that the only way might be to do all of the array work separate from the calendar TextDisplayObject, and then just use the finished array in the Matrix object. I’m just hoping that I am missing something in the use of the standard Lookup functions.

Why use lookups to build an array? ArrayBuild or ArraySelectBuild do it much more easily and the formula makes it possible to include, eliminate or even adjust the results by each record’s data.

Yup. I read Jim’s response on this thread and stopped mid-sentence at his suggestion to use Lookup( for the calendar entries when ArrayBuild( will a better answer for many calendar situations.

The Lookup( functions are looking like antique functions more and more every day. :upside_down_face:

Since Panorama X 10.0 arraybuild( is essentially a lookup function, or it can be when the query parameter is used. I never ever never use the lookupall( function any more, but I very frequently use arraybuild(. Basically arraybuild( is the one-to-many version of superlookup(. If starting over I probably would have used the name superlookupall( instead of arraybuild(, but arraybuild( already had a name long before.