Skip Navigation

[Resolved] Crosstab view

This support ticket is created 5 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by Minesh 5 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1609991

Tell us what you are trying to do?
I am trying to create a cross tab view or something similar.
I have:
- Shifts - post type for standard shifts - name - start time - end time - type of shift
- Profile - this is the 'staff' member post type - which links to the user
- Roster - this records the shift, the profile, and the date the shift applies.
Relationship Profile - Roster - Shift
(date)

(I have also considered creating a date post type ... so the date exists, even if a roster doesn't yet)
Alternative relationship
Date - Roster - Shift
|
Profile

For the staff member that assigns rosters for staff, I want to create a view that summarises the roster information for, for example, 7 dates from the filter date.

the view I would like is for example:
Columns are the dates for 7 days from the filter date
Rows are the Profiles that match staff members needing rosters
Cell are the Rostered shift assigned to that Profile on that Date ... if it exists (with link to edit)
If it doesn't exist ... the option to add a shift.

date | date+1 | date+2 | date+3 | etc.
Profile Name (link) Shift shift shift shift
Profile Name (link) Shift shift shift shift
Profile Name (link) Shift shift shift
Profile Name (link) Shift shift shift shift
Profile Name (link) shift shift shift

Hopefully you understand what I am trying to achieve.
I can adjust my approach based on advice given.

Is there any documentation that you are following?
Haven't found anything yet that shows this kind of functionality.
some of the posts reviewed include
https://toolset.com/2013/10/how-to-group-views-results-by-year-and-month/
https://toolset.com/forums/topic/set-publish-date-of-post/
https://toolset.com/documentation/user-guides/views/using-a-child-view-in-a-taxonomy-view-layout/
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-date/
https://toolset.com/forums/topic/submitting-multiple-cred-forms-inside-a-views-loop-with-a-a-single-button/

Is there a similar example that we can see?

What is the link to your site?
hidden link
(Not a live site ... still under development)

#1610743

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

The thing is that, with views you can loop through the content. Having said that, you can add rows content one after another.

To generate such tabular output with different column may require is complex and may require multiple views.

Basically, if you have parent/child post-relationship, you can display the parent/child data using nested views.
=> https://toolset.com/documentation/user-guides/views/using-a-child-view-in-a-taxonomy-view-layout/

But, you also want dynamic columns (header row) i.e. Columns are the dates for 7 days from the filter date.

I need to review your structure first, can you please share problem URL where you want to add your view as well as for what content you want to create the view.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1612179

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - so basically, you need a calendar type view and that is not possible using Toolset views.

We already made announcement that we will add the calendar view feature to Toolset but that is still in the initial stage and we just collecting the information from users and checking what they want to have with calendar views:
=> https://toolset.com/2019/06/do-you-need-calendar-view-for-toolset/

As I said, you display the related data using nested views but at the same time it will not be in the calendar view type. It will be top to the bottom hierarchy of your post-relationship. Where you can start with the top relationship post type and traverse through the bottom.

If you want to play with views and all other plugins, we offer a free test platform http://www.discover-wp.com where we offer the readymade reference sites and using any of the reference site we offer, you can create a test site and play with it.
=> https://discover-wp.com/site-templates/