Column Data Referenced / Selected by Another Columns Data
aseniuk
Posts: 22
Hi All,
I was wondering how I would do something like this. Lets say we want to get the gender of the person or rather select the gender first then fill in an appropriate name based on the gender.
Other areas where this would also be handy would be postal code, filling in the postal code based on the country/stat and, Phone numbers.
If anyone has an idea on how to achieve this please give me a post.
Thanks
I was wondering how I would do something like this. Lets say we want to get the gender of the person or rather select the gender first then fill in an appropriate name based on the gender.
Other areas where this would also be handy would be postal code, filling in the postal code based on the country/stat and, Phone numbers.
If anyone has an idea on how to achieve this please give me a post.
Thanks
Database Analyst
Alberta Justice and Solicitor General
Alberta Justice and Solicitor General
Comments
http://www.simple-talk.com/content/arti ... rticle=697
which explains how to use the IronRuby generator to manipulate data. Specifically, please see the example of using conditional logis in that article:
title = table.row("Title")
if(title == "Mr")
column.set "M"
elsif(title == "Miss" or title == “Msâ€)
column.set "F"
else
column.set "?"
end
You can use the NamesFirstMale.xml and NamesFirstFemale.xml files in the above code to specify male or female names in a specific column base on gender.
Let me know if this is what you need.