How to use dynamic list on a table column? - working now

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

How to use dynamic list on a table column? - working now

#1

Postby xren » Tue Sep 17, 2013 7:38 pm

Hi,

I am building a questionnaire form: displaying a table using repeater. Each row contains a question and it's answer (radio button choices for the answers)
I set the answer column in the table display as radio button and use a dynamic list.
In the before page script:
I fetch the table, then loop through it, for each row, I set the dynamic list query value by the question in that row.

However, the answers for all the rows are the same (the last row's answer in the database)

How can this be done?

Thanks,
Xiaoli
Last edited by xren on Wed Sep 18, 2013 7:26 pm, edited 2 times in total.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Wed Sep 18, 2013 1:17 pm

Hard to say what's wrong without looking at your form. I'm guessing that your Dynamic List has a single replaceable variable which contains your SQL statement and this is mapped to one of your table columns. Can you make sure that this variable is marked as required in the Dynamic List.

The system will try and share a Dynamic List specified for a table column - it does this to minimize the number of times the list has to be built. To stop this sharing, the list must have at least one list field marked as required that is mapped to a table column.

You might also switch on debug for the list so you can see when it is built.

Regards
Jon
0 x

xren
Ebase User
Posts: 272
Joined: Fri Dec 14, 2012 2:55 pm
Location: Ottawa

#3

Postby xren » Wed Sep 18, 2013 3:36 pm

I have fixed it.

I call buildList in the loop for each row. Then it works fine now

Thank you Jon
Xiaoli
0 x


Who is online

Users browsing this forum: No registered users and 16 guests