First of all: If you want to make life easier on yourself, change that correlation a bit, so that you capture a single list containing all the relevant data for the chosen person in a single item.
So you get this:
CorrelatedValue_1 = "11111<random_HTML ... more random HTML>AAAAAA - LastName1, FirsName1" CorrelatedValue_2 = "222222<random_HTML ... more random HTML>BBBBBB - LastName2, FirstName2" .. etc.
We really don't care for that random HTML in the middle, but saving it probably won't hurt us a lot and it will make this easier since we now only have a single list of items to deal with and all of them look the same.
From there, this is actually an easy problem. I use ylib for this, so I will explain it using those functions, but you can probably get the same effect without it with a little bit of C glue code.
Doing it with y-lib involves these steps:
First, we choose a random element from the correlated values:
That will save the chosen value in a parameter named "CorrelatedValue".
Second, we split that parameter into it's constituent parts: y_left("CorrelatedValue", "<RandomHTML", "prop"); y_right("CorrelatedValue", "RandomHTML>", "propobj");
These two functions will basically save the part to the left of your random HTML into the "prop" parameter, and the part to the right of your random HTML into the "propobj" parameter.
Note that the "RandomHTML" thing is basically the right and left boundary of the correlation, just as you would have in a normal web_reg_save_param() call.
And that's basically the entire hat trick. Three easy function calls and a bit of smarts when it comes to capturing your input is all it needs.
Note that you'll need to put y-lib into your script first. Doing that is easy: Download the files from github (link is in my sig), right-click on extra files, choose "add files to script", and use that to add the ylib files.
Then simply add the following line at the top of vuser_init:
--- Discover the y-lib loadrunner support library: https://github.com/randakar/y-lib