Navigation überspringen

[Gelöst] only show post in main view where sorted after a startdate from relationship

This support ticket is created vor 5 Jahren, 3 Monaten. There's a good chance that you are reading advice that it now obsolete.
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)

Dieses Thema enthält 0 Antworten, hat 1 Stimme.

Zuletzt aktualisiert von rexJ-2 vor 5 Jahren, 3 Monaten.

Assistiert von: Minesh.

Author
Artikel
#1359503
medarbejdere arbejdestid og ferie relation.png
medarbejdere.png
arbejdstider.png
query for mainview.png
view example.png

Tell us what you are trying to do?
I want to sort the employees view to show only employees that are working todaet ie. that have a startdate set for today

have a relationship between employee (medarbejder) and working date hour (arbejdstid)
where the main view show employees and the nested view show working hours is working fine.
As you can see on image view-example.png all employees are show up but i want only the employee with the green workinghour to show up.
Problem:
How can i sort the main view so that it only shows employees with a working date set to today()
I'm not sure how to make a conditional out in loop editor for the main view that make a lookup in the employees
relationship.

have tried in loop editor for the main view:

[wpv-layout-start]
 
<center><h2> I dag den [wpv-post-today]. arbejder:  </h2> </center>
<!-- <center><h2> I dag den <span id="maaned"> </span> arbejder:  </h2> </center> -->
<main class="cards">
    [wpv-items-found]
    <!-- wpv-loop-start -->
	<wpv-loop>
		[wpv-post-body view_template="loop-item-in-lg-tavle-medarbejder-vagtplan-kompasset"]
     <!-- [wpv-conditional if="( $(wpcf-start-tidspunkt) eq 'today()' ) OR ( $(wpcf-slut-tidspunkt) lt 'FUTURE_DAY(1) ' )"] show if employee have wpcf-start-tidspunkt (start date is set)[/wpv-conditional] -->
    
	</wpv-loop>
	<!-- wpv-loop-end -->
    [/wpv-items-found]
 </main>
[wpv-layout-end]

Can you help me with that coding
Is there any documentation that you are following?
https://toolset.com/forums/topic/how-to-make-a-conditional-statement-to-display-a-relationship/
Is there a similar example that we can see?
no
What is the link to your site? versteckter Link