I'm new at this, but have done plenty of VB before.
In trying to import a file, I'm having to do a bit of manipulation on some of the fields.
let's just say 2 things at this point:
1) concatenate two fields into one (house number + street name) in order to compare to the street address field
2) pre-pend leading zeroes to the zipcode field since they get stripped out at some point.
So both of these are no biggie for API right?
I go add a virtual field,
Then go into code use the add virtual column button to drop a chunk of code in there, and modify it to do what I want. great
Public Function ComputedColumn_635845922937436970( _
ByVal oField as ImportOM.API.iField, _
ByVal Cancel As ImportOM.API.iCancel) As String
'This function must return a text value
Dim sReturn As String = Import.Fields.GetByExcelName("K").Value + " " + Import.Fields.GetByExcelName("L").Value
Except at this point it doesn't work... nothing happens when testing code
so I go back to my virtual fields and try different things like naming my field the same as the function or selecting the function in the row for that Virtual field from the dropdown. Test again, nothing happens.
I notice that in one of the samples that works, someone had commented out the first line of code that says
That's odd, so I comment it out in my code as well, and remove the function name from the function column in the virtual fields view for that field.
Now it works. - that is ODD.
It seems like this sorta works by default. because there's only one function defined.
But what do I do if I want to add one more function, for example to append leading zeroes to a zipcode??
How do I tell it which virtual field does that function belong with?
Is there a video demo for that?