Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Changing Default Integer Style in Script ?

Hi All,

I am, as I type, attending the 3-day Qliktech developer course and a question has arisen that no-one here knows the answer to. When one starts a new Qlikview document a number of elements are set automatically including the Money Format:-

MoneyFormat='£#,##0.00;-£#,##0.00';  Adjusting this on the Main tab sets the default for the entire document and prevents a user needing to adjust this on every chart developed.

It would be great to set the Integer format for the entire document here too, specifically so that negative numbers default to appearing with brackets rather than a minus sign.

Does anyone know if this is possible and, if so what should be included at the start of the script?

Many thanks

Vivienne


1 Solution

Accepted Solutions
jaimeaguilar
Valued Contributor II

Re: Changing Default Integer Style in Script ?

Hi,

You can also change the format for every field you want in script,

like:

num(Field1, '#,##0') or whatever format you want to include to any field (even symbols like $)

regards

5 Replies
israrkhan
Valued Contributor II

Re: Changing Default Integer Style in Script ?

Hi Sacco,

as you said, MoneyFormat, DayName and so, in the script editor they all are Document Default variable,

if you go to Settings>> Variable Overview>> here you will see all document variables,

but there is no variable like number setting or so in the default document variable.

But you can create one for your document, and you can use where ever you want, but qlikview will not take it automatically like moneyformat. you have to pass this one in expression, where ever you want to use...

Hope it helps...

Employee
Employee

Re: Changing Default Integer Style in Script ?

There´s no variable to control that.

An workaround is Document Properties/Number and chooses every field you want to format

jaimeaguilar
Valued Contributor II

Re: Changing Default Integer Style in Script ?

Hi,

You can also change the format for every field you want in script,

like:

num(Field1, '#,##0') or whatever format you want to include to any field (even symbols like $)

regards

Not applicable

Re: Changing Default Integer Style in Script ?

Thank you both.

Would another way be to us num() to specify the numerical display format for each numerical fact field as they are loaded into the fact tables?

V

jaimeaguilar
Valued Contributor II

Re: Changing Default Integer Style in Script ?

Yes,

you can use num function to format any numeric field, so it would have this default format. Also, you can override this format in specific charts in properties > number tab, assigning a different format if you need so.