marcq
Member
Hi,
In one of my forms, I've got a date field element (book_bookingdate) and a database join drop-down element.
The table "fab_boarding_location" table contains also a field called "displaydate", which enable me to display in an enrollment form the content of the drop-down to certain date only (the current date).
In this new form, I would like to display the content of the drop-down not according the current date, but according the booking date, which is contained in one of my form date field element called "book_bookingdate" :
I'm unable to build the Data - where clause of the databasejoin element.
Table of the databasejoin drop-down element is : "fab_boarding_location"
Field of this table which contains the date is : "displaydate"
Table of the form is : "fab_booking"
Field of this table which contains the date to compare with is : "book_bookingdate"
Data - where clause tested without success :
I read already this thread and tried to code something similar :
http://fabrikar.com/forums/index.ph...where-clause-to-limit-dropdown-options.15491/
http://fabrikar.com/forums/index.php?wiki/database-join-element/
What is wrong ? Thank you in advance for your support.
Cheers,
Marc
In one of my forms, I've got a date field element (book_bookingdate) and a database join drop-down element.
The table "fab_boarding_location" table contains also a field called "displaydate", which enable me to display in an enrollment form the content of the drop-down to certain date only (the current date).
In this new form, I would like to display the content of the drop-down not according the current date, but according the booking date, which is contained in one of my form date field element called "book_bookingdate" :
I'm unable to build the Data - where clause of the databasejoin element.
Table of the databasejoin drop-down element is : "fab_boarding_location"
Field of this table which contains the date is : "displaydate"
Table of the form is : "fab_booking"
Field of this table which contains the date to compare with is : "book_bookingdate"
Data - where clause tested without success :
Code:
WHERE DATE({thistable}.displaydate)
IN (
SELECT DATE({thistable}.displaydate)
FROM fab_boarding_location, fab_booking
WHERE DATE({thistable}.displaydate) = DATE(fab_booking.book_bookingdate));
Code:
WHERE DATE({thistable}.displaydate)
IN (
SELECT DATE(fab_boarding_location.displaydate)
FROM fab_booking, fab_boarding_location
WHERE DATE(fab_boarding_location.displaydate) = DATE(fab_booking.book_bookingdate));
I read already this thread and tried to code something similar :
http://fabrikar.com/forums/index.ph...where-clause-to-limit-dropdown-options.15491/
http://fabrikar.com/forums/index.php?wiki/database-join-element/
What is wrong ? Thank you in advance for your support.
Cheers,
Marc
Last edited: