Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

swethasmilek
New Contributor

Error Handling Mechanism to verify all data files

Hi Friends,First time Listening Error Modes new to This can any one do needful,How to handle Error machanism in script .we will get data monthly data are placed in a Shared Folder of QMC job will run monthly.The following are Issues we need to addreess.

Error Handling Mechanism in Dynamic way

Step-1: Verify if file(s) is available.

Step-2: Verify file extension, naming convention (.txt/.xlsx)

Step-3: While uploading confirms:

Columns: Customer ID, Prod Number, Order Date, RI Type, Amount should not have a NULL cell.

If there is a NULL cell then Abort, Revert back and update log with failure details

Else, upload the file and update log with success

Move the processed file to a different folder

Step-4: Was this the last file?

- If No, move to next file and repeat steps 1-4

- If yes, move to step 5

Step-5: Inform user which were not uploaded

2 Replies

Re: Error Handling Mechanism to verify all data files

For these have a look in help by "for each ..." - there is an example to read folder/files per dirlist/filelist and read the file-properties like filename(), fileextension(), filetime() ...

To check the fields in a file you could read the column-header as values with FIRST 1 and "no lables". Possible null-values could you remove with a where-clause.

For moving files and inform users you could use EXECUTE which runs appropriate batch-files.

- Marcus

swethasmilek
New Contributor

Re: Error Handling Mechanism to verify all data files

Can any one Explain witha Real case Example

Community Browser