Start a new topic

If field is blank,copy from another field

I have a file of registrations that we import daily. The file has columns for Title and Gender. Registrants will often fill out the Title, but not the gender. I already have a dictionary set up to determine the gender from the title. Is there a way to say if the gender field is blank, then copy the field from the title and use the dictionary? If the field is not blank then I want to use whatever was entered by the registrant.

You would need to use a custom function for this. You would apply this to the Gender field. Then you can apply the Title->Gender dictionary to the field.

[code] Dim sReturn As String = oField.Value If sReturn = "" Then sReturn = Import.Fields.GetByName("TitleField").Value End If Return sReturn [/code]
Thank you, Wayne, I will give it a try.
Login or Signup to post a comment