DMXzone App Connect Support Product Page

This topic is locked
Answered

How do I hide something if the date associated with it is in the past?

Asked 25 Apr 2018 15:53:20
1
has this question
25 Apr 2018 15:53:20 Bruce Wilkie posted:
Hi there

I've got a html table on my web page that draws content from a database query.
Table rows are repeating, one row for each result in the query.
Each row contains details of an event, on a specific date.
One cell in each row contains a link to another page with more details of the event displayed in that row.

I want to only show that details page link if that event is on the current date (today), or some time in the future.

Something like this:

<span dmx-show="fixturedate1 => today">< a href="details.htm">More Info</a></span>

How do I do this with App Connect?

thanks in advance
Bruce

Replies

Replied 26 Apr 2018 07:32:48
26 Apr 2018 07:32:48 Teodor Kuduschiev replied:
Hi Bruce,
Please add a datetime component in app connect tree. Then you can use its value to check todays date.
Replied 26 Apr 2018 08:58:11
26 Apr 2018 08:58:11 Bruce Wilkie replied:
Thanks Teodor

I've added a 'Date and Time' into the App Structure window by right-clicking on 'App' and selecting 'Data > Date and Time'

This has added what looks like a Date and Time variable at the top of the App Structure window, called 'var1'

In the properties, the ID is 'var1' and something called the 'Interval' is set to 'Seconds' in a drop-down menu.

What do I do now?

Please could you tell me all the steps that I need to do in the reply in order to complete my objective?

Alternatively, is there a video or manual that shows me what I'm supposed to do? If so, could you send me a link to that?

thanks
Bruce
Replied 26 Apr 2018 09:44:05
26 Apr 2018 09:44:05 Teodor Kuduschiev replied:
Well, you can set the interval to days, this doesn't really matter.

You just use its value on the page, when comparing your db value with the datetime var value ...
Here you can see how to use it: www.dmxzone.com/go/32977/calculating-days-between-two-dates
Replied 27 Apr 2018 09:12:45
27 Apr 2018 09:12:45 Bruce Wilkie replied:
Thanks Teodor

Took the example and adapted it to work with dmx-show, so it does the job nicely

Bruce
This reply was removed on 11/19/2022 9:26:50 AM.
See the changelog

Reply to this topic