Custom distribution for the Custom List type

I am getting the following error

“error: Could not access blank value: Use || to provide a default value for blank fields. Example: (my_field || 0) + 1” when I have used custom data to generate the age…

I used the custom data for Age and used different distributions for various age groups according to my use case.

“20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64”

Any ideas on this ? The same logic worked for the blood group custom data O+,O-,A+,A-,B+,B-,AB+,AB- and custom distribution.

-Thanks

Share Link: http://www.mockaroo.com/0042c830

Notice how age is always coming up blank? That is because the rule in the custom distribution for the age field doesn’t have an expression in the “rule” column. The expression determines whether or not a rule is applied. Since the expression is blank the rule is never applied and the value of age is always blank. You can fix this by simply changing the expression to “true” so that the rule is always applied.

Thanks for the response.

Setting “true” in the Rule box doesn’t seem to work. Can you pls check?

Share Link: http://www.mockaroo.com/0042c830

Ah, it looks like there is some bug that’s causing this to fail when all of the values in the list are numbers. I’ll have a look at it tonight and see if I can get a fix out asap. In the meantime you could flip your distribution over to random and everything should work, but it will be flat.

Thanks. If you can send the fix tonight it would be great.
Actually for my dataset I have to use some deterministic way for the generation of age, so cant really use random.

I will wait for your fix.

Thanks

In the meantime you can also achieve the same functionality by uploading the numbers in a csv file as a Dataset. You can include an extra column in your file called “frequency” which contains the relative frequency with which each age should appear (the same concept as a custom distribution). To use the uploaded dataset in your schema, select the “Dataset Column” field type.

I will probably wait for your fix Mark. Hopefully by tonight if we have the fix, that would work for me.

The fix has been deployed. Also, it turns out that if you have only one rule that rule is always applied, so you don’t need the “true” expression - you can just leave the rule column blank.

Thanks for the fix.
Its working fine.

Just a follow up on this question. I am facing a similar problem when accessing dates from a ‘dataset column’ into a formula. Any idea on this?

Can you send me the share link to your schema in a private message? I’d be happy to take a look.