Automatically Assign Gender in Reference to the Name
This lesson will show how to generate an individual’s first name based on what gender has been generated. This can be done by creating a Gender Domain and then linking the following three Generators for the firstName Attribute:
- NameGen
- NameGen
- EvalCaseGen Generator
Domain Setup
For this example, a User Domain has been added to the selected Project Version of a given Project.
The User Domain contains six Attributes:
Step 1: Add a gender Attribute
Add a gender Attribute to the User Domain. To learn more about adding Domains, click here.
Step 2: Move the gender Attribute above the firstName Attribute
Within the Domain Dashboard, click on the Rearrange Attributes button.
Click and drag to move the gender Attribute to another position. It must be located above the firstName Attribute. Then click the Close button.
Step 3: Select the firstName Attribute
Within the Domain Dashboard, click on the Attribute Name.
Step 4: Change Alias to Female for gen1
Use the Edit (Pencil) icon to enter an Alias for the gen1 Generator:
Step 5: Change the nameType and sortOrder Parameters for gen1
Make the following changes to the gen 1 NameGen Generator:
- nameType = firstName
- sortOrder = random
Remember to click the Save Generator button.
Step 6: Add a second NameGen Generator
Use the Add Generator to add (or link) a Generator.
Enter NameGen into the Filter input field and then click the Plus (+) to add the Generator.
Step 7: Change Alias to Male for gen2
Use the Edit (Pencil) icon to enter an Alias for the gen1 Generator:
Step 8: Change the nameType and sortOrder Parameters for gen2
Make the following changes to the gen2 NameGen Generator:
- nameType = firstName
- sortOrder = random
Remember to click the Save Generator button.
Step 9: Add an EvalCaseGen Generator to the firstName Attribute
Use the Add Generator to add (or link) a Generator.
Enter EvalCaseGen into the Filter input field and then click the Plus (+) to add the Generator.
It will appear at the bottom of the Linked Generators Table.
Step 10: Make Changes to the EvalCaseGen Generator Parameter
Make the following changes to the EvalCaseGen Generator Parameters:
- equation = var1 == “F”
- var1 = Reference the gender Attribute
- caseTrue = Reference gen 1 (Female)
- caseFalse = Reference gen 2 (Male)
Remember to click the Save Generator button.