Link to home
Start Free TrialLog in
Avatar of sanjshah12
sanjshah12Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Redgate Data Generator

Hi,

I am using the Redgate Data Generator to populate a table.

The field I am populating checks to see if another column field is not empty then randomly selects a value from the list.

random.choice('a','b','c') if Approved == "Yes" or Approved == "No" else "Fail"

Open in new window


Any help is appreciated.
Avatar of lcohan
lcohan
Flag of Canada image

And kindly, what is actually the question or the issue you're having?
Avatar of sanjshah12

ASKER

Many thanks for replying Icohan,

I can use the following:

“True” if Approved == "Yes" or Approved == "No" else "Fail"

Which works fine, but I am trying to add a random choice from a list, so that the field when Approved == “Yes” it is populated with either “a”, ”b” or “c” in this example

I hope this makes sense.

Regards,

Sanj
ASKER CERTIFIED SOLUTION
Avatar of lcohan
lcohan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Icohan,

I will check the link and revert back.