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? hidden link