# Merging Different Constructed Lists

I have 2 predefined list of 6 images and need to show 1 random image from list A and 5 random images from list B in a free format table. I created 2 constructed lists, so I can randomize the items and pick the first from list A and the first 5 from list B.

I have used the ListLabel function to call all 6 items into the cells of the freeformat table. The challenge is that this method assigns a fix position for items of each list. Since I'm only showing 1 out of 6 from List A, this would introduce order bias (the brand is easy to recognize), so essentially I need to be able to show the random selected items from both lists (1+5) in random cells in the free format table.

I thougth I could do it by merging the 2 constructed lists in a third constructed list and then randomize the items but not sure how to do it since they have 2 different parent lists.

Any thoughts of how to do this?

Thanks,
M
retagged Sep 13, 2012
Thank you Paul for the detailed explanation. You are a life saver!
Thank you Bryan as well!

+1 vote
Have all the items start from the same parent list.  Then, you can move the first 6 onto a new list, randomize them for the fist question (picking just the top item from the randomized list).  Then, move the last  six items onto a new constructed list, randomize those, and pick the top five from that one to show.
answered Feb 19, 2012 by Platinum (170,115 points)
+1 vote
We can sort this problem out for you.

You can create a parent list that contains all 12 images from the A+B lists.

Let's call this parent list ImageList ...

1 Image 1A
2 Image 2A
3 Image 3A
4 Image 4A
5 Image 5A
6 Image 6A
7 Image 1B
8 Image 2B
9 Image 3B
10 Image 4B
11 Image 5B
12 Image 6B

Create one contructed list that selects from the A images and one constructed list that selects from the B images and then combine the 2 constructed lists. The parent list for all of these 3 constructed lists will be ImageList.

ASelConList
Randomize()
ListMax(1)

BSelConList
Randomize()
ListMax(5)

ABSelConList
Randomize()

You can now have access to the 6 randomly selected images (1 from A and 5 from B)  via teh constructed list ABSelConList.

Use the following ...

1st image - [%ListLabel(ABSelConList,1)%]
2nd image - [%ListLabel(ABSelConList,2)%]
3rd image - [%ListLabel(ABSelConList,3)%]
4th image - [%ListLabel(ABSelConList,4)%]
5th image - [%ListLabel(ABSelConList,5)%]
6th image - [%ListLabel(ABSelConList,6)%]

Good luck.
answered Feb 19, 2012 by Platinum (78,075 points)