DMXzone Server Connect Support Product Page
Nested Loop help - Dynamic variables
Asked 03 May 2019 13:15:07
1
has this question
03 May 2019 13:15:07 Matthew Da Cruz posted:
Hi Guys wonder if anyone can help.
I have a nested loop.
It has
level 1
- level 1.a
-- level 1.a.1
When using the debugger on can see the data array returns all 3 levels.
In the screen output only show
level 1
- level 1.a
-- level 1.a.1 is not showing which is the 3rd loop.
here is the loop structure
level 1: dmx-repeat:repeat_silo_data="serverconnect_ranking_sup.data.loop_Silo"
- level 1.a: dmx-repeat:repeat_silo_category_data="loop_cat" dmx-show="cat_slug == (query.kw.slugify())"
-- level 1.a.1: dmx-repeat:repeat_silo_cat_sup="loop_cat[0].sup_articles"
When I use dmx-repeat:repeat_silo_cat_sup="loop_cat[2].sup_articles"
The correct data is painted on screen.
Is there a vairable one can use that will populate [2], with the correct row in the loop.
I've tried loop_cat[$index].sup_articles
loop_cat[$key].sup_articles
nothing works. Any ideas
Replies
Replied 03 May 2019 14:47:39
03 May 2019 14:47:39 Matthew Da Cruz replied:
Any ideas
Replied 03 May 2019 16:14:16
03 May 2019 16:14:16 Matthew Da Cruz replied:
with final testing when I hard code the array number in
dmx-repeat:repeat_silo_cat_sup="loop_cat[2].sup_articles"
The results return.
What must I add to this loop to making dynamically change the array: dmx-repeat:repeat_silo_cat_sup="loop_cat[2].sup_articles"
What goes in here -> "loop_cat[2]
Here is the nested loop stack.
Last loop needs dynamic change: loop_cat[2].sup_articles
level 1: dmx-repeat:repeat_silo_data="serverconnect_ranking_sup.data.loop_Silo"
- level 1.a: dmx-repeat:repeat_silo_category_data="loop_cat" dmx-show="cat_slug == (query.kw.slugify())"
-- level 1.a.1: dmx-repeat:repeat_silo_cat_sup="loop_cat[2].sup_articles"
dmx-repeat:repeat_silo_cat_sup="loop_cat[2].sup_articles"
The results return.
What must I add to this loop to making dynamically change the array: dmx-repeat:repeat_silo_cat_sup="loop_cat[2].sup_articles"
What goes in here -> "loop_cat[2]
Here is the nested loop stack.
Last loop needs dynamic change: loop_cat[2].sup_articles
level 1: dmx-repeat:repeat_silo_data="serverconnect_ranking_sup.data.loop_Silo"
- level 1.a: dmx-repeat:repeat_silo_category_data="loop_cat" dmx-show="cat_slug == (query.kw.slugify())"
-- level 1.a.1: dmx-repeat:repeat_silo_cat_sup="loop_cat[2].sup_articles"
Replied 04 May 2019 10:21:10
04 May 2019 10:21:10 Matthew Da Cruz replied:
Any ideas guys
Replied 07 May 2019 06:59:43
07 May 2019 06:59:43 Matthew Da Cruz replied:
Free, Unlimited Technical Support
Get full technical support in our forums and Live Chat. <-- where is this. I need to be there...
Why does it take ages to get a response?
I am paying a subscription which includes above.
No point using the tools if no one is available to assist when a person gets stuck.
i have lost 3 days now on this issue
Get full technical support in our forums and Live Chat. <-- where is this. I need to be there...
Why does it take ages to get a response?
I am paying a subscription which includes above.
No point using the tools if no one is available to assist when a person gets stuck.
i have lost 3 days now on this issue
Replied 07 May 2019 07:30:06
07 May 2019 07:30:06 Teodor Kuduschiev replied:
Hello Matthew,
Our support is not available during the weekend and you posted this on Friday evening, after our working time was over. Indeed nobody answered on Monday, but somehow we've missed your post as it was a busy day. Sorry about that!
Now on the topic - how are you getting these repeats - are these 3 different queries? Are these queries which are nested in the same server action? It's not really clear what exactly are you trying to achieve an what is not working.
Our support is not available during the weekend and you posted this on Friday evening, after our working time was over. Indeed nobody answered on Monday, but somehow we've missed your post as it was a busy day. Sorry about that!
Now on the topic - how are you getting these repeats - are these 3 different queries? Are these queries which are nested in the same server action? It's not really clear what exactly are you trying to achieve an what is not working.
Replied 07 May 2019 15:49:32
07 May 2019 15:49:32 Matthew Da Cruz replied:
Hi Theodor
All in one query.
www.screencast.com/t/PHoQH6nE8
The html looks like this
www.screencast.com/t/lwgsctb59
Thanks for any help
All in one query.
www.screencast.com/t/PHoQH6nE8
The html looks like this
www.screencast.com/t/lwgsctb59
Thanks for any help
Replied 08 May 2019 09:45:10
08 May 2019 09:45:10 Teodor Kuduschiev replied:
I think your third nested repeat expression is wrong.
Please try:
Please try:
dmx-repeat:repeat_silo_cat_sup="sup_articles"
Replied 08 May 2019 10:35:05
08 May 2019 10:35:05 Matthew Da Cruz replied:
Hi
When I select the sup_articles the interface gives this: loop_cat[0].sup_articles
www.screencast.com/t/LQo8P50wkro5
When doing your suggestion the 3 loop does not show
www.screencast.com/t/PfZ1uNJ9yte
When I select the sup_articles the interface gives this: loop_cat[0].sup_articles
www.screencast.com/t/LQo8P50wkro5
When doing your suggestion the 3 loop does not show
www.screencast.com/t/PfZ1uNJ9yte
Replied 08 May 2019 10:55:46
08 May 2019 10:55:46 Teodor Kuduschiev replied:
Please provide a link where i can inspect your page.
Also - do you filter the nested queries on the server side in the server action?
Also - do you filter the nested queries on the server side in the server action?
Replied 17 May 2019 11:21:21
17 May 2019 11:21:21 Matthew Da Cruz replied:
Hi
we do filter the records by the parent id.
Its just the 3rd level that does not show.
This image shows the server connection
www.screencast.com/t/m7rO5Ta2E
All the records come back correct and in the order we want from the server connection.
The area highlighted in red is the part that is not looping on the page
www.screencast.com/t/i95KFl8H4
The code on the page looks like this
www.screencast.com/t/veaie5P0ZS
The screen output looks like this.
www.screencast.com/t/H6HbKk5m6n
I'm sure it is something simple but for the life of me I cannot get the 3rd level loop to work
we do filter the records by the parent id.
Its just the 3rd level that does not show.
This image shows the server connection
www.screencast.com/t/m7rO5Ta2E
All the records come back correct and in the order we want from the server connection.
The area highlighted in red is the part that is not looping on the page
www.screencast.com/t/i95KFl8H4
The code on the page looks like this
www.screencast.com/t/veaie5P0ZS
The screen output looks like this.
www.screencast.com/t/H6HbKk5m6n
I'm sure it is something simple but for the life of me I cannot get the 3rd level loop to work
Replied 21 May 2019 11:08:44
21 May 2019 11:08:44 Matthew Da Cruz replied:
Any ideas?
Replied 21 May 2019 14:53:35
21 May 2019 14:53:35 Teodor Kuduschiev replied:
I am not sure i understand what exactly are you doing and what the issue is.
Please provide a link where i can inspect the page.
Please provide a link where i can inspect the page.
Replied 21 May 2019 20:54:27
21 May 2019 20:54:27 Matthew Da Cruz replied:
Hi
I can't give url as it requires login details to access.
basically Im looping through 3 tables.
In the server connect all records show as demonstrated in images above.
However the parent, child show but the nested results under child do not show
parent < shows
- child < shows
--- nested child < does not show.
It seems to be a setting with the repeats.
I tried what you suggested but no luck
I can't give url as it requires login details to access.
basically Im looping through 3 tables.
In the server connect all records show as demonstrated in images above.
However the parent, child show but the nested results under child do not show
parent < shows
- child < shows
--- nested child < does not show.
It seems to be a setting with the repeats.
I tried what you suggested but no luck
Replied 23 May 2019 12:12:54
23 May 2019 12:12:54 Teodor Kuduschiev replied:
I am sorry, but i will need a link to this page where i can inspect what goes wrong. It's hard to guess what could be wrong there, without debugging it my browser.
Please setup some temp account and send me the url with the login details to:
Please setup some temp account and send me the url with the login details to: