Using where clause in a repeatgroup

Fred04

Member
I have a repeat group with a databasejoin element (rendered as drop-down). It works

Now I want to filter the result of the databasejoin element based on the repeatgroup counter. This way, each repeatgroup will have its own set of values in the dropdown

Pb, I don't know how to put a $repeatCounter in a SQL statement

It may look like something like:

where idsubques = '{subquestion___id_$repeatCounter}'

Hope you get the idea. Any suggestion?
 
can we put some php variable in the where clause of a databasejoin element

something like:

where idsubques = $repeatCounter

or

where idsubques = '{subquestion___id_$repeatCounter}'
 
not really sure about this one, wouldn't you need to do via javascript as you can add/remove groups?
 
The repeat count isn't available during page load for the WHERE clause, as it's not part of the placeholder data, at that point it just exists as a PHP variable and we don't support PHP variables as candidates for our placeholder replacement (too dangerous).

It is possible we could add another "special" placeholder, like {repeatCounter}, but that'd be quite a lot of work to add throughout our code, and I'm loathe to add it as yet Another Custom Feature for just for the database element WHERE processing.

I'll grab Rob on Skype, have a talk about it.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top