Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
IAMDV
Master II
Master II

Object Naming Conventions

Dear All,

Please can you share some good practices in object/ variable naming conventions? I am planning to build a report which uses macros & triggers… So I thought I would take some inputs in terms of naming conventions followed.

Thanks in anticipation!

Cheers - DV

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

In my practice, the best naming conventions are based on simple common sense and consistency:

1. Field names should be as close to "human readable" format as possible. For example, most developers will have fields like:

"Supplier Code",

"Supplier Name - Short",

"Supplier Name - Long"

In this case, the Designer will be forced to always rename one of those fields into "Supplier" - in every chart and every list box. My recommendation would be to pick one of the fields as the "main" representation of Supplier, and call it simply "Supplier", to avoid constant renaming.

2. For variables, I'd recommend following 3 simple rules:

- using a prefix "v" to distinguish variables from fields,

- Type full variable name, trying to avoid abbreviating - for example, vTargetGrossProfitMargin and not vTGPM

- Consistently using Mixed casing (each new word starts with a capital letter) - for better readability

I'd be happy to learn additional recommendations from other developers.

cheers,

Ask me about Qlik Sense Expert Class!

View solution in original post

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

In my practice, the best naming conventions are based on simple common sense and consistency:

1. Field names should be as close to "human readable" format as possible. For example, most developers will have fields like:

"Supplier Code",

"Supplier Name - Short",

"Supplier Name - Long"

In this case, the Designer will be forced to always rename one of those fields into "Supplier" - in every chart and every list box. My recommendation would be to pick one of the fields as the "main" representation of Supplier, and call it simply "Supplier", to avoid constant renaming.

2. For variables, I'd recommend following 3 simple rules:

- using a prefix "v" to distinguish variables from fields,

- Type full variable name, trying to avoid abbreviating - for example, vTargetGrossProfitMargin and not vTGPM

- Consistently using Mixed casing (each new word starts with a capital letter) - for better readability

I'd be happy to learn additional recommendations from other developers.

cheers,

Ask me about Qlik Sense Expert Class!
IAMDV
Master II
Master II
Author

Thank you very much!

I am expecting more responses from other members.

Cheers - DV

Anonymous
Not applicable

I would also like to hear the experts' voice in terms of object naming convention (textbox: txt_; listbox: lst_; etc.), lenght, etc.
I know I can make my own one, but wonder if there is a best practice.