DMXzone App Connect Support Product Page

Answered

Hide html section if recordset is empty

Asked 03 Mar 2017 10:25:05
1
has this question
03 Mar 2017 10:25:05 Michele - posted:
Hello,
I've this section that shows the latest news on a page:

<div>
      <div class="news-ticker">
        <ul id="repeat1" is="dmx-repeat" dmx-bind:repeat="serverconnect1.data.rsNewsticker">[*]{{desc_newsticker}}[/*][/list]
      </div>
    </div>


I need to hide it if the recordset is empty (no news, no box "news-ticker" ).
Is it possibile with App Connect?

Thanks.

Replies

Replied 04 Mar 2017 23:16:55
04 Mar 2017 23:16:55 Michele - replied:
Is necessary the "App Connect Data Formatter" extension to create show/hide recordset?
If yes, where is possibile to download it?

Replied 06 Mar 2017 08:18:51
06 Mar 2017 08:18:51 Teodor Kuduschiev replied:
Hello Michele,
Select your div, then dynamic attributes > show. For the expression, select serverconnect.data.query and just add length to it so it becomes:
serverconnect1.data.query1.length

I will see if this can be added in the UI, in this week's update.
Replied 06 Mar 2017 11:41:20
06 Mar 2017 11:41:20 Michele - replied:
Thanks Teodor!
Replied 21 Mar 2017 07:57:17
21 Mar 2017 07:57:17 Teodor Kuduschiev replied:
Hello Michele,
with the release of app connect formatter you can do this really easy now: www.dmxzone.com/go/32811/show-or-hide-elements-on-your-page-when-a-query-returns-no-results/
Replied 21 Mar 2017 08:32:02
21 Mar 2017 08:32:02 Michele - replied:
Excellent! Thanks!

Reply to this topic