Hello,
We have a different but related issue. If we would like to mark all phones and emails being imported from the source data as primary when there is data in that field (not the blanks). How can this be accomplished via IOM? Regular expression?
Hi hyimam,
This could be accomplished through a virtual field and a dictionary. Map the virtual field to "Is primary", set the function to copy field, and the seed to whichever field contains the phone number or email. Then apply a dictionary to that virtual field that has a value to match on of ^.+$ and a replacement value of Yes and turn on regular expressions. This dictionary only populates "Yes" if there is a value in the cell that contains the email address or phone number.
Thanks,
John
This thread has been useful for me, but being that I haven't had much practice with object oriented programming, I'm stuck trying to get the set_Fields part to work. I understand that I need something to specify what I want to update, but I'm not sure how.
I also am getting the Object or With block not set error. This is what I have at the moment:
Dim phoneSetField = phone.GetType.GetMethod("set_Fields", New Type(){GetType(Integer), GetType(Object)})
Dim retVal1 = phoneSetField.Invoke(phone, New Object() {2, "<set phone type here>"})
Is there a chance that a future update to Omatic might make it easier to reference elements of the phone grid?
Lisa Folger
Hi,
We are trying to add API code to determine if an incoming phone or email should be marked Primary or not depending on the status of the constituents current phones or emails.
We have upgraded to RE 7.95 and this upgrade changed how phones are stored so we are having some confusion. In order to familiarize ourselves with the new phone fields we have written some code to view the Phone Type in a MsgBox. This way we can be sure that we are accessing the correct fields. However, we are still having some problems as there as still fields marked PreferredAddress.Phones (which isn't where phones are stored anymore so it's confusing).
Here is the code we've started with which is returning a "blank" even though our constituent has a Preferred Email and a Home phone.
Dim oPhones as CConstitPhones
Dim oPhone as IBBPhone
For each oPhone in oRec.PreferredAddress.Phones
MsgBox ("Here is the current phone code: " & oRec.Fields(Blackbaud.PIA.RE7.BBREAPI.EPhonesFields.Phone_fld_PhoneType))
Next oPhone
Any help would be greatly appreciated!
Thanks,
Lisa Folger
W