Add a user prompt for criteria?
Forums
Hi all, I am very new to IDEAScript/Caseware and I searched the forums before posting this question:
For the following code I want a dialog box that will pop up to ask the user for the dates rather than having to manually change it in the code; how to go about that?
Function DirectExtraction
Set db = Client.OpenDatabase("PY_POPSDATA2.IDM")
Set task = db.Extraction
task.IncludeAllFields
dbName = "PY_POPSDATA.IDM"
task.AddExtraction dbName, "", " PYRPOPS_STATUS_IND == ""T"" .AND. PYRPOPS_DATE_TO_BE__DATE >=""20130501"" .AND. PYRPOPS_DATE_TO_BE__DATE <""20140201"""
task.PerformTask 1, db.Count
Set task = Nothing
Set db = Nothing
Client.OpenDatabase (dbName)
End Function
i have a problem.
i have a problem.
Error 101. el sistema no puede encontrar la ruta especificada.
but it exist.
Function TextImportUSR50001 Set task = Client.GetImportTask("ImportExcel") dbName = "C:\AreaTrabajoIDEA\_FicherosBase\MU-total-usuarios.xlsx" task.FileToImport = dbName task.SheetToImport = "500UsuariosIMP" task.OutputFilePrefix = "MU" task.FirstRowIsFieldName = "TRUE" task.EmptyNumericFieldAsZero = "FALSE" task.PerformTask dbName = task.OutputFilePath("500UsuariosIMP") Set task = Nothing' Client.OpenDatabase(dbName)End Function
Hello and welcome to the site
Hello and welcome to the site.
I put together some code for you with a basic dialog (I have attached the script) what will ask for two dates, the code will then verify that they are in the proper date format and if not give a message of the error and allow you to reenter the dates in the proper formats. I then have inserted the dates into your code. Hopefully this will give you an idea of how to use the dialog. I also have a series of videos that will walk you through creating a script and adding a dialog, you can find it here. So let me know if this helps you out or if you are looking for something else.
Thanks