1

I am able to capture the response using ord=All in web_reg_save_param.

case 1, Input:12345 Response:["18/3/2017","20/2/2017","20/2/2016"].

case 2, Input:98451 Response:["12/1/2017","01/1/2016"]

web_reg_save_param("date","LB=\"","RB=\"","ORD=ALL","LAST); ` Captured Values are:

date_1:18/3/2017

date_2:,

date_3:20/2/2017

date_4:,

date_5:20/2/2016

Here is the task:

1) I need to fetch random date each time.

2) Date may vary depending upon the input(In case 1, 3 dates and case 2, 2 dates).

I have tried:

1) Correlating and using lr_paramarr_random() function- failed, it will fetch ',' at some point.

2) using for loop and if statement to find out odd/even position.

Koby Douek
  • 16,156
  • 19
  • 74
  • 103
Basava
  • 42
  • 4

1 Answers1

2

Using web_reg_save_param() function like you did will, of course, fetch a comma(',') since it is situated between two quote symbols(' " ').

You can use web_reg_save_param_regexp() function with the following regular expression:

"(\d{2}\/\d\/\d{4})"

Set the parameters: "Ordinal=All", "Group=1".

This function will extract the dates and store them into an array.

This time lr_paramarr_random() should return correct results because now your array contains nothing but dates.

George Rylkov
  • 614
  • 5
  • 8