Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Synchronising two lists

I have two lists with nearly the same members.
Each list contains 8 pictures. One list branded, one anonymous.
From the anonymous list 6 pictures have to be shown in randomized order.
Code for the randomized anonymous list:

Newlist

add (f18piclist,1,8)
randomize (1,8)
LISTMAX (6)

Some questions later the same pictures have to be shown, not necessarily in the same order(but it would be nice), but branded.

My first idea was the idea of a masterlist 1 to 8 (anonymous part) and 9 to 16 (branded part) .
The constructed list anonymous list  is build that way :

add (masterlist,1,8)
randomize (1,8)
LISTMAX (6) .

For the the branded list i had the idea of a perl script. Example for the first member :

brandedlist

Begin Unverified Perl
 if ((ListValue ("anonymouslist", 1) == 1))
 
 {  
 
    ADD("masterlist",9,9);  
    
 
 }  

  End Unverified
  
Begin Unverified Perl
 if ((ListValue ("anonymouslist", 1) == 2))
 
 {  
 
    ADD("masterlist",10,10);  
    
 
 }  

  End Unverified
  
Begin Unverified Perl
 if ((ListValue ("anonymouslist", 1) == 3))
 
 {  
 
    ADD("masterlist",11,11);  
    
 
 }  

  End Unverified
  
Begin Unverified Perl
 if ((ListValue ("anonymouslist", 1) == 4))
 
 {  
 
    ADD("masterlist",12,12);  
    
 
 }  

  End Unverified
  
Begin Unverified Perl
 if ((ListValue ("anonymouslist", 1) == 5))
 
 {  
 
    ADD("masterlist",13,13);  
    
 
 }  

  End Unverified
  
Begin Unverified Perl
 if ((ListValue ("anonymouslist", 1) == 6))
 
 {  
 
    ADD("masterlist",14,14);  
    
 
 }  

  End Unverified
  
Begin Unverified Perl
 if ((ListValue ("anonymouslist", 1) == 7))
 
 {  
 
    ADD("masterlist",15,15);  
    
 
 }  

  End Unverified
  
Begin Unverified Perl
 if ((ListValue ("anonymouslist", 1) == 8))
 
 {  
 
    ADD("masterlist",16,16);  
    
 
 }  

  End Unverified
asked Sep 10, 2013 by K-Jo (220 points)

1 Answer

+1 vote
You can use the MIRROR function to clone the first list if you are in V8
answered Sep 10, 2013 by Mike Lodder Gold (23,410 points)
sorry forgot to say that i use v7
If you have 2 similar lists, the way to get around it is with Perl, as you indicated. V8 has the handy Mirror function and also caters for offsets. Regarding randomising the code lists, include a seed in the randomize function when using both lists to keep the randomisation the same.
...