Vitaly, I am not quite following why you would need more than one set_list to read all the data sets related to a data template. Basically, when you use Set_list command named de_list and select the data template Data_Explorer, it will read the entire 119 items into a 2 dimensional array. Now, you can use loops to reference all the columns and rows of values. Here are some examples: @de_list[0][0] returns Data_Explorer_Nurse_Scholar_School_HPSA, de_list[0][1] returns the second column of the first row, and @de_list[1][0] returns the first column of the second row, etc. Hope this helps.
Set_List usage
From what I understood, by using "Set_list" method we need to specify field_name to get a value from the data set as it described in Subject7 message ("In order to read the individual array items the following syntax should be used: @{array_name.field_name}[@i] where “i” is the loop variable.").
In this case I need to create multiple data sets to read values from the same field. So, syntax @{array_name.field_name}[0] will return value from the specified field from data set 1. Then syntax @{array_name.field_name}[1] should return value from the same field from data set 2 etc. Is there a way to get value from the array by using array_name only and just index from the same data set. This way i could work with only 1 data set. Something like that "@array_name[0] should return me value from column 1, @array_name[1] should return value from column 2 etc.
Actually your answer resolved my issue. I tried to use set_list method as multi-dimensional array but was not getting my value back. I thought that i need to use specific syntax as was provided in your release comment. So, i was using curly brackets @{de_list}[0][0]. From your reply I learned that I just need to use dataset name with indexes @de_list[0][0] and it worked for me. Thank you.
We are re-designing one of client's applications and we got a request from customer to compare data between both website (legacy and new) and also compare data on the new website with data from DB if everything was properly mapped. Currently, client is doing it manually going over hundreds records to test the data. in the first example below one of the tables where we have more than 100 health centers, and i'm verifying each name with the name from DB by using Set_List method. Since Set_List is limited to 100 records, I think i'll have to use some kind of if/else condition and create two looping runs to loop through the first 100 and than create another list with the rest and loop through the second list.
Please sign in to leave a comment.