Formulate View field from multiple date entries?
I have a View field to show me fitting appointments between 2 selected dates (start date & end date), where it shows me all appointments where the "Fitting Date/Time" falls in between these:
let xbeg := 'Start Date';
let xend := 'End Date';
select Fitting where 'Fitting Date/Time' >= xbeg and 'Fitting Date/Time' <= xend
This works perfectly, but I wish to add an extra date field on the fitting appointment called "2nd fit date", if the job is being carried out over multiple days.
Is it possible to have a View where I can incorporate both dates?
i.e 'Fitting Date/Time' and '2nd Fit Date' >= beg?
(p.s. I've tried that and it doesn't work ;D)
30 replies
-
said:
However I just copied your code and put it in but it still doesn't work. I've just taken 2 screen shots to show you.I don’t know what to say, but it works for me. Can you try it in the same DB you sent me?
-
Hi and , I've uploaded the 'ninox export (sample DB).ninox' into my workspace (cloud) to test.
I noticed that the 'Fitting Date/Time' is an appointment field and not a 'datetime' one. Based on that I first used the start() function to extract the start timestamp of each appointment and then used the date() function to extract the start day of the appointment.
I can confirm that the below code inside the function of the view element works well in my settings:
let xbeg := 'Start Date'; let xend := 'End Date'; select Fitting where date(start('Fitting Date/Time')) >= xbeg and date(start('Fitting Date/Time')) <= xend
Content aside
- 5 mths agoLast active
- 30Replies
- 221Views
-
4
Following