Allright fellow developers. I am completely stumped on this:
I have 2 web service datasources that retrieve data from a SQL DB and bound to their respective repeating tables in the form. I need to nest one of the repeating tables within the other repeating table for the purpose of showing all the data of datasource 2 that corresponds to each row received form datasource 1.
So to make it easy let me make an example that is easy to get (my project specific example would confuse more than help)
lets pretend we have a data source that gets Car manufacturers and car models. the first data source would be a web service that gets car manufacturers. the second datasource, would receive a car manufacturer ID code and look up all the models. So the EXPECTED result should look like this...
Name=Toyota | idcode=1
Name=Corolla | idcode=10
Name=Camry | idcode=20
Name=Honda | idcode = 2
Name=Prelude | idcode = 30
name=Civic | idcode=40
Ok so what I did was drag the columns of one repeating table inside another repeating table. then the value of one of the fields returned by the first data source, is
passed into the query field of the second data source which retrieves
its values with that id key.
Here's the problem (and i have tried doing this programmatically as well but no dice):
It seems that whats is happening is, the inner model types repeating table is the SAME instance for EACH row of manufacturer. WHen I debug I see its calling the data source result for each row ok, I can see it loop with Corolla and Camry only. Then next iteration , its Prelude and Civic.
BUT, when the data is populated inside the Models repeating table, it overwrites what i had in there before and starts over and that affects EVERY model table result. So, even though the repeating table is being looped for EACH manufacturer row, its a cloned instance.
SO in simpler terms,the ACTUAL RESULT im getting is :
Name=Toyota | idcode=1
Name=Prelude | idcode = 30
name=Civic | idcode=40
Name=Honda | idcode = 2
Name=Prelude | idcode = 30
name=Civic | idcode=40
I hope this makes sense. So is it possible to have a unique repeating table within another repeating table without treating each inner table as a duplicate of others nested in diff rows of the outer table?
please help!