Question : Script Needed in Great Plains Integration Manager

I have the following script in Integration Manager in the mapping of a field to be imported.
 
If SourceFields("gname")= "Self - name on Client Payor" then
            CurrentField = SourceFields("billaddr1")
Else CurrentField = SourceFields("gaddr1")
End if

I need 2 things on this.  I need to change the IF portion of line 1 to be IF(Left 4="SELF").  The change I need to be able to import if IS NULL (import Blank).  Help me change my script to include these additional conditions.
Thanks

Answer : Script Needed in Great Plains Integration Manager

Hi,

For line one, this should work:

If Left(SourceFields("gname"), 4) = "self" Then

I'm not entirely sure how you need to use ISNULL, but my guess is that the attached code might be what you are looking for.

Let me know if that looks right, or if you need something different.

Thanks,

Steve Endow
Dynamics GP Certified Trainer
Dynamics GP Certified Professional
1:
2:
3:
4:
5:
6:
7:
If IsNull(SourceFields("gname")) Then
	CurrentField = ""
ElseIf Left(SourceFields("gname"))= "Self" Then
	CurrentField = SourceFields("billaddr1")
Else 
	CurrentField = SourceFields("gaddr1")
End if
Random Solutions  
 
programming4us programming4us