2 Replies Latest reply on Aug 4, 2015 8:50 AM by JeffBroderick

    Import records script doesn't work the same as a manual import

    JeffBroderick

      Title

      Import records script doesn't work the same as a manual import

      Post

      I have a file where multiple imports are done from a .xlsx file.  

       

      It's a fairly simple file with two tables - one for Inventory import and the other for a Scanned Count.  If I manually import from the Inventory layout, choosing the inventory worksheet in Excel, the records come in normally.

      If I move to the Scanned Count layout, which is associated with the Scanned Count table, and manually import the records from the Excel worksheet for the scan, the records come across normally and then a sub summary  report is used to count the individual items.

      For some reason, when I script the import, it will only default to the Inventory table.

      My script starts with Go To Layout  to the Scanned Count layout, which is associated with the Scanned Count table.  For some reason, I can see using the Script Debugger that the Inventory table is selected as the target and no other option to change it is present.

      I'm wondering why it would work differently in a script than in "manual mode".

       

       

        • 1. Re: Import records script doesn't work the same as a manual import
          philmodjunk

          In "manual mode", the current layout selects the target table for you. There's a drop down list in the dialog for selecting a target table, but the layout's table is already selected but your only other available option is "new table".

          For a scripted import. You are not limited to the current layout's table and go to layout does not select the target table. Instead, that drop down that in manual imports only allows you to choose between the current layout's table and "new table" now allows you to select any target table in your file.

          • 2. Re: Import records script doesn't work the same as a manual import
            JeffBroderick

            Thanks Phil.  That got me going in the right direction.  When going step by step, I found that I had kept the Inventory table as the target in the "Specify import order" dialog in the Import Records script.  

            When I changed the target there to Scanned Count, it selected correctly during the running of the script as well as showing the "new table" choice as you described, rather than being grayed out as it was when I was running the script the first time.  I wasn't looking deeply enough into the script steps. Appreciate your help!