I am getting there, slowly but surely. I have an integration for a payables transaction. Our vendor finally had to write it for me and it uses a script.
Now I want to change the script. This is what it was:
but I was getting an error because the Else should have been Else sPurchase = 0.
But now, I also want to add a second "if" so I did this and it only works if DistType is "PAY".
Okay, I just ran it again (answering my thread within my thread...I am losin it)!
I think the reason is because there is more than one line in the source query for the same vendor invoice that uses "CASH". I think I need another grouping level.
Okay I added pm - transaction with grouping level for the Distribution Type but how do I add the amounts together using an integration script?
thanks
barb
Now I want to change the script. This is what it was:
Code:
If (SourceFields("pm detail.DistType"))="PAY" Then SPurchase=SourceFields("pm detail.Amount")*-1
Else sPurchase=""
End If
CurrentField=sPurchase
but I was getting an error because the Else should have been Else sPurchase = 0.
But now, I also want to add a second "if" so I did this and it only works if DistType is "PAY".
Code:
If (SourceFields("pm detail.DistType"))="PAY" Then
SPurchase=SourceFields("pm detail.Amount")*-1
Else
If (SourceFields("pm detail.F3"))="CASH" Then
SPurchase=SourceFields("pm detail.Amount")*-1
Else sPurchase=""
End If
End If
Okay, I just ran it again (answering my thread within my thread...I am losin it)!
I think the reason is because there is more than one line in the source query for the same vendor invoice that uses "CASH". I think I need another grouping level.
Okay I added pm - transaction with grouping level for the Distribution Type but how do I add the amounts together using an integration script?
thanks
barb