VI job with File Assign IM_ItemVendor

SUGGESTED

Trying to do a VI import into IM_ItemVendor but in my import file I don't have the vendor number only the vendor name so I file assigned the vendor number on a conditional statement if the temp field (pointing to the vendor name in import file) equals the vendor name in Sage 100. My temp field never gets assigned because it says the vendor number is required. Not sure if there's any way around this. Sage 100 Adv v2021. Thanks.

Parents
  • 0
    SUGGESTED

    You can't attempt to set or get values from fields until after the primary key fields have been set, one of them being the vendor number as others have mentioned.  

    Also, as Kevin mention, there is no enforcement on the uniqueness of the vendor name, so it really isn't a good practice.  It would be better to try to come up with a way to get the correct vendor number in the source file.  

    If you are set on using the vendor name, you could accomplish this with perform logic and you could try using the AP_Vendor_Svc's GetResultSets using the alternate index called kName.  If you don't want to mess with perform logic, you could try first passing the source file by using VBScript to handle looping through each line and either using ODBC or the BOI to attempt to get a vendor number based on the name.  You would then use the resulting file with the import.

Reply
  • 0
    SUGGESTED

    You can't attempt to set or get values from fields until after the primary key fields have been set, one of them being the vendor number as others have mentioned.  

    Also, as Kevin mention, there is no enforcement on the uniqueness of the vendor name, so it really isn't a good practice.  It would be better to try to come up with a way to get the correct vendor number in the source file.  

    If you are set on using the vendor name, you could accomplish this with perform logic and you could try using the AP_Vendor_Svc's GetResultSets using the alternate index called kName.  If you don't want to mess with perform logic, you could try first passing the source file by using VBScript to handle looping through each line and either using ODBC or the BOI to attempt to get a vendor number based on the name.  You would then use the resulting file with the import.

Children
No Data