Using Data Picker to select data from within a repeat - now showing as 'repeatname[0].value' instead of just 'value'

Wappler Version : 4.b10 (was happening in 9 too).
Operating System : Mac
Server Model: Node
Database Type: MySql
Hosting Type: Docker local, AWS remote.

Expected behavior

What do you think should happen?

Previously, if you selected data from within a repeat (as long as you are within the repeat itself) it would show the immediate path e.g. ‘value’.

However, what I’m now finding is that it’s prepending the value with the repeatname[0].

This used to happen if you were trying to add a value from the repeat to an element outside of the repeat, but now if I’m adding a value of an element inside the repeat it’s doing this.

3 Likes

Repeat is located where? On the page or in server connect steps?
Maybe explain more detailed what exactly and where are you selecting.

Sorry Teodor, rushing around today.

The repeat is on the F/E - on a page. The data comes from a SC Paged Query.

Within the repeat are for example user cards - I select an element within the repeat to bind some data to it - usually I would just select the value, and it will display just the value - right now it’s prepending the repeat path with the first array location.

What’s the repeat expression on your page?

Confirming this bug in Beta 10.

Just spent over an hour, probably close to two, wondering why my nested repeat wasn’t working. It was due to the picker putting the nested repeat as “getIssues.data.repeat[0].getCon” instead of just “getCon”. As soon as I manually typed out just “getCon” it worked as intended, and as it does on Wappler 3.9.9.

You can follow this guide to reproduce it appears to happen all the time: https://docs.wappler.io/t/nested-repeat-regions/5165

1 Like

Are you 100% sure you pick the right data from the data picker?
You should select the data available under the repeat, not under the server connect component in the data picker.

This has been happening to me for a while, only in Node though. I want to say ever since the content.value thing started. I have just been working around it and modifying the code.

1 Like

Can someone please post a couple of screenshots of what is on the page exactly (the code / repeat region) and what do you pick exactly in the data picker and where are you trying to insert it on your page?

Yes, I’m positive. I have a bunch of nested repeats throughout the project I’m working on, all done exactly the same in Wappler 3.9.9, as soon as switching to Beta 10 doing it the same way would give the incorrect path.

I’ll try to get a gif of this later today or tomorrow.

1 Like

We had similar issues in Node selecting from repeats to populate data store items (as well as other selections made within repeats). Only been recent though. We had to crack on to get the Project out so have not yet reported as a bug but can confirm is happening in Node Projects for us.

I guess I should add in my case this is occurring in PHP. I have not tested any other server model for this particular bug.

Have you seen any changes on the server action side of things too? I have this happening Possible bug or user error with creating a array comma separated

I am seeing something similar with saving a repeater row id as a cookie value.

If I select the id in the data binding popup for the repeater it only shows the [0] value. Instead, I just type “id” and it works fine.

This is with node as some other commenters have mentioned.

I am using 3.9.7 on a mac. I created a new content page in Node, and set up a quick test for the repeater to show what I’ve seen almost every time I have databindings in a repeat and you know what? It works perfectly, as expected. I don’t know why it is working for me now when I see it happen all the time, my luck I guess. I KNOW it happens, so I will keep trying to find the combination. Maybe it’s when I use server actions from several versions ago and try to bind them in a repeat? I want to say it started about the same time the databindings started to have the content prefix in front of the server connect query, like “content.serverconnect.data.query”

Seems to be occurring since the mid 4.. range of releases. We also have 3.9.7 installed with no issues relating to the above bug.

1 Like

Thanks Dave. I haven’t downloaded the beta versions yet. The issue I have seen may not be related to the OP issue, so I will try to make a note of it next time I see it.

I was able to reproduce it in Node. I have a table created with the table generator. When I try to add a data binding into a cell I get the content.tableRepeat2[0] issue.

To choose my data binding I click the “ImportDate” field from the table repeat


Here is showing I am selecting inside the table repeat

I added another pic because my table has a lot of columns in it and just scrolling down (because you can’t resize the boxes…)

And here is the resulting code.

I have been editing the code to take out the content.tableRepeat2[0].

This should be only in NodeJS indeed when working within content pages.

However - I tried different scenarios and couldn’t really reproduce it…
Tried repeating server connect from the main layout page as well from the content page itself and under the repeater I was able to select the correct fields directly - it didn’t generate any long paths.
tried using the generators and change the bindings afterwards - all went ok.

Actually the repeater expression shouldn’t be starting with content
Maybe it was an old pick before we fixed the error in previous beta: