I am not able to make a View template to work with an intermediate table connecting two tables with a many to many relationship and wondered if this is a bug, not expected to work or something I have got wrong.
Table 1 is Calendar Event
Table 2 is Organisation-Venue
The connecting table is organisation-venue_calendar-event Intermediary Posts (organisation-venue_c) which has a field "Event-Organisation-Reason" that is mandatory and can have one of three values: "Venue" "Primary Organisation" "Other".
I have run several tests (see below) and also used the numeric code for event-organisation-reason, as stored in the database.
==========================
==========================
The template used in the View is:
<p>
[wpv-conditional if="( $(wpcf-event-organisation-reason).id(organisation-venue_c) = '' "]
[wpv-post-link]<br />
[types field='event-organisation-reason' item='@organisation-venue_calendar-event.intermediary'][/types]<br />
<br />
[/wpv-conditional]
</p>
--------------------------
Result:
Mickleton Village Hall
Venue
Mickleton Table Tennis Club
Primary Organisation
--------------------------
==========================
[wpv-conditional if="( $(wpcf-event-organisation-reason).id(organisation-venue_c) = 'Venue' )"]
No results
--------------------------
==========================
[wpv-conditional if="( $(wpcf-event-organisation-reason).id(organisation-venue_c) ne 'Venue' )"]
Mickleton Village Hall
Venue
Mickleton Table Tennis Club
Primary Organisation
--------------------------
==========================
It would be very helpful if you could advise whether this conditional is intended to work?
I am aware that you cannot use intermediate field in the record selection criteria and wondered if was the also the case for View templates.
Many thanks
Tony