cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Question on Repeater

Former Member
0 Likes
423

Hi,

I am using 2 repeaters in my BLS - one below the other. Looks like the second repeater is holding the values from the previous iteration and as a result causing double dipping problem. Could anybody suggest how to fix this - basically reset the second repeater for each iteration. Thanks in advance.

Regards,

V M.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Did you configure the second repeater to repeat on the output of the first repeater?

Former Member
0 Likes

Christian,

Repeater_1 loops on SQL_Query_1.Results{/Rowsets/Rowset}.

Repeater_2 loops on SQL_Query_2.Results{/Rowsets/Rowset}.

There is a link in between SQL_Query_2.Param.1 = Repeater_1.Output{/Item}.

Basically if I have 3 items to loop on the 1st SQL Query and, lets say, 5 items for each one of those 3 items on the 2nd SQL Query. When I display the output in the end, I want them to be displayed like the following -

R1-1 R2-11

R1-1 R2-12

R1-1 R2-13

R1-1 R2-14

R1-1 R2-15

R1-2 R2-21

R1-2 R2-22

R1-2 R2-23

R1-2 R2-24

R1-2 R2-25

R1-3 R2-31

R1-3 R2-32

R1-3 R2-33

R1-3 R2-34

R1-3 R2-35

Thanks,

V M.

Former Member
0 Likes

You are going to have to give some more detail of your logic flow. Are you calling SQL_Query_2 for each iteration of the first repeater?

Former Member
0 Likes

Thats correct. I am not sure if thats the best way to get the desired output (as displayed above). Thanks.

Regards,

V M.

Former Member
0 Likes

Check your query outputs. Confirm your first query doesnt have multiple rows with the same value being passed to Query 2. This could look like data is "retained" but you are really just processing the same key twice cause it occurs in multiple rows. Confirm that your second query is returning the data that you expect. Sometimes LIKE statments with wildcards can give you more results than you want.

Other than that I dont have any other suggestions.

Regards,

Christian

jcgood25
Active Contributor
0 Likes

Are both SQL Query actions pointing to the same data server connection? If so, it would be more efficient to just write your query all in one request instead of secondary queries inside a repeater. The more you can push down data requests to the database itself the better off you'll be from a simplicity standpoint and performance too.

Regards,

Jeremy

Former Member
0 Likes

Use a SQL Join...or if the rowsets aren't that large, the Joiner action.

Former Member
0 Likes

Thanks for the ideas guys. Things are fine and dandy now.

Regards,

V M.