Skip to main content

Macro that will import new files monthly

Hi,
I am fairly new to IDEA script, and I am trying to modify a macro so that it will import two new files monthly that we receive from another department.  The file names are the same except for the date at the end which is why I have tried using an input box that you can see in part of my script attached.  I am getting many syntax errors and am having trouble working around them.  Is there a better way to go about this?
 

Brian Element Fri, 11/04/2016 - 13:11

Hi Breanna,

Did you try running just that section of code to see if it works?  Also I adapted what you sent me to your script, do you want to try it out.

Brian

Client.RunAtServer True
dbName = "IDEA_Account_" & dateParm & ".IMD"
Client.ImportDelimFile "IDEA_Account_" & dateParm & ".csv", dbName, FALSE, "", "IDEA_Account_20161031.RDF", TRUE
Client.OpenDatabase (dbName)
Client.RunAtServer False

 

Breanna_28 Fri, 11/04/2016 - 13:39

It only runs when I have already imported the file manually.  Once I delete the file from the Source Files and Import Definitions folders in the Library and try to start from scratch it cannot find the file.  I tried running the script you provided above and unfortunately I get the syntax error here.

Brian Element Fri, 11/04/2016 - 13:55

The syntax error is because you didn't add a function line to the top of what I gave you.  You need to add

Function TextImport()

Brian Element Fri, 11/04/2016 - 14:30

Hi Breanna,

Sorry I am at a loss right now.  I haven't used the server version of IDEA before so I don't know the tricks.  You might want to give the audimation (assuming your license is with them) help desk a call and they would hopefully be able to help you out.

Good luck.

Brian