## Question

## Queries regarding Monte Carlo Data set

Hi Team,

I'm exploring Monte carlo data set to see if we can generate test data as per our needs. We usually use GenRockit to generate such test data. I'm not able implement few requirements via this data set.

1) Area code - It should be randomly selected among 510, 408, 416 .I have tried Options.optionsCSV(Text). But didn't work as these are integers.

2) Mobile number - It should be a random number generated in the format XXX-XXXX (e.g. 257-9011). I couldn't find a way to do that.

3) Conditionally generate Random Integers in Range - I have used this expression, @If(InternationalPlan=="Yes",@random(10,50),@random(0,30)). But the random number generated is a decimal with almost 8-9 digits after the decimal point. Is there a way to generate random integers with in range conditionally? or decimals with limited digits after decimal point.

Thanks,

Vamsi.

Hello Vamsi,

Please have a look at the PDN article that details all the options in the Monte Carlo data set (called "providers"). The 7.2.2 version of the help is here https://pdn.pega.com/sites/pdn.pega.com/files/help_v722/procomhelpmain…

There may be newer versions available.

The outputs you are looking for can be created using a configuration like below. GEOFIELD1/USAGEFIELD1 are numerics, PERSONALFIELD10, 5, 6 and 7 are text fields. Although the MC set generates a text field, the conversion of the area code (GEOFIELD1) to a number is taken care of by the platform. For the phone numbers, there are providers you could use directly (PERSONALFIELD10) but if you really need deeper customization you can combine the two fields yourself in an expression (PERSONALFIELD7). Generating random integers in a range is standard functionality (

numberBetween).If you run/browse/preview this data set, you get output like this

Hope this helps!

Otto