Start a new topic

Importing multiple volunteer types

Our organization has 4 volunteer types, which are indicated on our application when it's submitted. The data is coming to me with any or all of the volunteer type boxes with 1 date (date of app) and 1 status (active).

I would like to copy the date and status from Volunteer type 1 to Volunteer types 2, 3 or 4 as they are populated. I wrote a virtual field to copy those fields, but what I don't know how to take into account the fact that volunteer types 2, 3 or 4 may or may not be blank. So the first time I imported I got Volunteer type 1 along with a date and status, but volunteer types 2-4 had the date and status with no type because there were not any additional volunteer types selected in the data. 

So how do I tell the import to copy the date and status to volunteer type 2, 3 or 4 from volunteer type 1 ONLY IF there is a value in volunteer type 2, 3 or 4?

1 Comment

You need to make your own custom function that first checks to see if the column is blank before copying the value. You should make two functions to make it easy. They are basically identical except that one will point to the date field and one will point to the status field.

They both look something like:

[code] Dim sReturn As String = “” ‘ Set the SEED value to point to the column containing the possible attribute value ‘ Assign this function to the column where you want to copy the data (either date or status) ‘ If the attribute field is not blank then copy over the data If oField.Value <> “” Then ‘ you should put in the name of the field that contains the data to be copied instead of “Attribute1DateOrStatusField” below sReturn = Import.Fields.GetByName(“Attribute1DateOrStatusField”).Value End If Return sReturn [/code]
Login or Signup to post a comment