Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Naming of files in QDF

Hello,

Most files and folders are prefixed by a number in QDF. For example: "3.ConnString". This is not a problem for folders which are anyway referenced by variables, but for files such as locales or subs it is quite difficult to remember "1.FileExists.qvs" instead of just "FileExists.qvs" when you write new scripts.

I was wondering why this is the case? Could a future version be without these numbers for files.

Regards,

Krzysztof

1 Solution

Accepted Solutions
Magnus_Berg
Employee
Employee

Hi Krzysztof, you do not need to use the numbers on your own applications and scripts. The ideas of using number series are several. The first one is that folders and files together an index so that documentation and tagging becomes easy. Example 1.HR\1.Application\3.HR-app\1.qvdloader.qvw could also be referenced as 1.1.3.1 in publisher tasks and documentation. The number series is also seen as a differentiator between custom code and built in QDFcode in the sub function library. There is also a new sub function in development that will identify global variables on the number serie and use the name after "dott" as the variable name.


A tips: In the latest release there is a sub function named 99.loadall.qvs if you add a include statement to this file in Shared folders Custom.qvs, all the built functions will be loaded into all applications by default and you do not need the includes in the applications any longer. hope this helps?

Best regards

Magnus

View solution in original post

3 Replies
Not applicable
Author

If the file name is always preceded by a number and then a '.', then you can use subfield(FileName,'.',2) to strip out the last part you need.

Cheers,

Byron

Not applicable
Author

Yes and no... sometimes you can have a number larger than 10, but this is not really my problem.

The thing that bothers me is when I want to use some sub in my script I have to write:

$(include=$(vG.SubPath)5.DoDir.qvs);

Magnus_Berg
Employee
Employee

Hi Krzysztof, you do not need to use the numbers on your own applications and scripts. The ideas of using number series are several. The first one is that folders and files together an index so that documentation and tagging becomes easy. Example 1.HR\1.Application\3.HR-app\1.qvdloader.qvw could also be referenced as 1.1.3.1 in publisher tasks and documentation. The number series is also seen as a differentiator between custom code and built in QDFcode in the sub function library. There is also a new sub function in development that will identify global variables on the number serie and use the name after "dott" as the variable name.


A tips: In the latest release there is a sub function named 99.loadall.qvs if you add a include statement to this file in Shared folders Custom.qvs, all the built functions will be loaded into all applications by default and you do not need the includes in the applications any longer. hope this helps?

Best regards

Magnus