Start a new topic

Action if field is not blank

I'm having trouble finding a sort of all-inclusive way to have an action be taken if a field is not blank.

Here is the issue:
I have an upload file, and say columns A - D each correspond to different solicit codes. If these columns have a T in them, I want that column's code to be added into the constituent's record. I've found the regular expression for 'not blank' but I'm really hoping I don't have to create a separate dictionary for each column. Is there any way that I can assign a static virtual field based on whether or not a field is 'not blank'?

I've tried making a static virtual field with no dictionary, and it assigns all codes to every constituent. When I do it as a 'copy field' rather than static, then it only reads 'T' and gives me an exception.


You could make a custom function that you could reuse for each column.

The function would look something like this:

If oField.Value = "T" Then

    sReturn = oField.Name

End If

Now, if you name your columns A-D as the solicit code names and apply the function to them, the function will replace T with the name of the column and that should import them correctly.

The column names don't have to be the same as the Excel column names just FYI so you can change them in the profile without changing them in the file.

Alright, great. This sounds exactly like what I need. I just can't seem to figure out how to create a custom function. Where is that tool located in IOM?

Hi Erin,

Welcome to the forums! The best place to get help with advanced data manipulation is the ImportOmatic API Forum. To get started on the IOM API, make sure you check out the introductory video here (it's a ten minute video that will save you hours of time getting started with IOM API development!). We look forward to seeing you input on the forums!

Jeff

Erin, I also just put up a post outlining the basic steps in adding a custom function. The video Jeff links to has a lot more content but here is the post I just made in case you want some sweet screenshots to look at.

http://www.omaticsoftware.com/Forums/tabid/108/aft/1341/Default.aspx
Login or Signup to post a comment