Page 1 of 1

Data Generator - Dependant on another column value

Posted: Tue 25 May 2021 05:34
by cdunn66
Hi Support,

Would you be able to explain how I might configure Data Generator to use one of its generator functions but have this dependant on another column value?

I will try to explain by way of a made up example.

Say I had a Product Table, which had the following columns
Product Id <- Generator (Sequential Id)
Product Type <- Table Lookup (Two possible values 1 - External / 2 - Internal)
Product Name <- Generator (Product Name)
Product Price <- Generator (Decimal - Min/Max Range)

Above is all straightforward, but what if I only wanted to set a Product Price if the Product Type = 1 (eg External). How would I do this?

Re: Data Generator - Dependant on another column value

Posted: Tue 25 May 2021 09:12
by dzhanhira
To implement such dependencies, you need to use a Python generator.
Examples of python scripts can be found here: http://docs.devart.com/data-generator-f ... rator.html

Re: Data Generator - Dependant on another column value

Posted: Wed 26 May 2021 04:53
by cdunn66
Many thanks...Will give it a go.