Hello,
I'm re-opening this ticket 'cause it ain't working.
https://toolset.com/forums/topic/need-help-with-a-view/
My original question:
Hello,
I'm using the most recent versions.
I have the following CPT's
Works
Tracks
Writers
Clients
Pitches
The Relationships are:
Works - Tracks (one2many)
Works - writers (many2many) - has intermediary cpt with fields
Pitches - Tracks (many2many) - has intermediary cpt with fields
ALSO - Pitches has a post reference field to Clients.
I would like to do the following view as a table (columns not necessarily in this order)
Track Title | Work Field X | Writer Title | Writer intermediary cpt field X | Pitches field X | Pitches intermediary cpt field X | Pitches post reference to Client Title
I can get some of the columns above but I can't get them all together.
...........................................................
THE PROBLEM:
In the view I can get:
Work Field, Track Field, Writer field, Writer intermediary
BUT..."pitches" only shows me the last "pitch" published for the track, it doesn't show me all the "pitches" connected to a track.....Also...I haven't even explored yet how to get "Pitches intermediary cpt field"
Hope all this is possible....
Thank you!
regards,
Scott.
Hello,
How do you setup the view?
I assume we are talking about a view for querying the "Track" posts, in the column "Pitches field X" you are going to display related "Pitches" post, if it is, since there could be multiple related "Pitches" posts, so you will need to setup a child view to display it:
1) Querying the "Pitches" posts
2) Filter by:
Select posts in a "Pitches - Tracks" relationship that are related to the Post where this View is shown.
3) And display the Pitches field X
Same as above, for column "Pitches intermediary cpt field X", it needs another child view, query the intermediary cpt
Hi Luo,
I don't get what you're saying.
Not sure what a "child view" is.
Do you mean to create a view querying pitches, add field, Filter by: Select posts in a "Pitches - Tracks" relationship that are related to the Post where this View is shown,
and insert this view into the loop of the "Tracks View"?
If this is what you mean, this doesn't work. All that does is show every pitch for every track under each track listed in the Track View.
Thanks,
Scott.
Yes, you are right, that is the child view.
I am not sure if you how do you setup the views, please try these:
1) Deactivate other plugins (except Types plugin) and switch to wordpress default theme 2017, and test again
2) Provide a test site with the same problem, also point out the problem page URL, I can setup a demo for you
thank you - it's a journey!