DMXzone Database Connector 2 Support Product Page
Setting default record for query when no URL parameter present
Asked 22 Oct 2019 14:14:08
1
has this question
22 Oct 2019 14:14:08 Rachel Semmler posted:
I have a repeat region that uses a URL parameter to filter the query. Is there a way to set a default recordset to display when there is no URL parameter present? Replies
Replied 23 Oct 2019 05:54:55
23 Oct 2019 05:54:55 Teodor Kuduschiev replied:
Hi Rachel,
what needs to be displayed on your page exactly, when the url param is missing?
what needs to be displayed on your page exactly, when the url param is missing?
Replied 23 Oct 2019 15:25:43
23 Oct 2019 15:25:43 Rachel Semmler replied:
Hi Teodor,
When there's no param, I'm looking to display the most recent record.
It's a meeting page, which shows details for a specific meeting based on the url param (meetingID). When there is no URL param, it would show the details for the last meeting in the database (highest meetingID).
Thank you for helping!
When there's no param, I'm looking to display the most recent record.
It's a meeting page, which shows details for a specific meeting based on the url param (meetingID). When there is no URL param, it would show the details for the last meeting in the database (highest meetingID).
Thank you for helping!
Replied 24 Oct 2019 07:32:05
24 Oct 2019 07:32:05 Teodor Kuduschiev replied:
You just need to make the filter conditional, i.e. to be applied only when it has a value. So use the same value for the condition, as you are using for the filter, this will make the filter work only when there is a value:
Then, on the page how are you binding the data, is it in a repeat region, or do you bind the values directly on the page?
Then, on the page how are you binding the data, is it in a repeat region, or do you bind the values directly on the page?