you are looking for Pivot Table/Cross tab(ulation). This is not native to FileMaker without some fancy footwork. You might search this forum first for possibilities.
now that you know it's not native to FM (displaying your data that way), you can focus on how to display the data in your well-formed database.
There are many ways to go about it. You could stick to your HTML approach and script it to be dynamic, based on your data. That might be fun, actually. I would probably create a grid of dummy worker repeating fields populated by a script. Others will doubtless suggest other ways.
Set up a list view layout based on your staff table. Add a row of one row portals to your join tables. Use portal filtering and global fields to control which records appear in a given column of these portals.
I've done the following based on what I think is your advice
I created a new blank layout based on People table.
In the body of that table I've inserted eight portals - each portal is based on the Join table called "People_Shifts". The eight portals are:
- Employee name
- Seven portals - one for each day of the week - Day 1 to 7
I've filtered each daily portal as follows:
If (People_Shifts::gStartDate plus 1=People_Shifts::Shift_Date ;
Translated: If the Global Start is (say) Monday, and the shift date is Monday - then show the field called "Start_End_People_Shift" - otherwise "blank".
With one row, you only see one shift. If a person has two shift or even three shifts in a particular day, then you have to change the portal rows to 2 or 3 - so its not dynamic.
Or have I totally misunderstood you?
See result below - which is decent enough - but I am showing 2 rows per Daily portal. Had you something else in mind?
That's the problem - How or what kind of script is needed to make it dynamic?
My original solution is a 'sort-of' cross-tab solution, in that the days are in columns. But it's not yielding the results. Philmodjunk has made a suggestion and I have created a decent enough looking roster - but its not dynamic.
1 of 1 people found this helpful
I had assumed that a given person would only have one shift per given day, but to allow for more simply requires using more portal rows as you have already discovered.