Qlik Community

Qlik Sense Documents

Qlik Sense documentation and resources.

Announcements
WE ARE LISTENING! New Navigation for Qlik Community, Sept. 26: TELL ME MORE

Introducing the Sense Field Formatter

cancel
Showing results for 
Search instead for 
Did you mean: 
MichelLalancette

Introducing the Sense Field Formatter

Introducing Sense Field Formatter

It is very likely that many of you build your data models so that you can easily reuse certain parts, such as dimensions.

Although some development methods such as the Qlik Deployment Framework (QDF) help speed things up, the task of renaming fields when reusing a QVD is still time-consuming.

Let's imagine that a fact table contains 3 customer dimensions and 2 warehouse dimensions and that for each of these dimensions you add a prefix, or that your fields are written in a multilingual way ([Customer/Customer/Cliente]) and you want to get the middle value. You could also use it to rename fields from an SQL database and format everything for a nice front-end result in Qlik.

It's now easier than ever with Sense Field Formatter.

What it does

Sense Field Formatter 1.png

Sense Field Formatter 2.png

(https://youtu.be/k3HQpJivyZM)

Allows a user to format a list of fields, delimited by commas, into an alias and standardized format.

The user has multiple configuration options to choose from.

When the extension icon is clicked, a popup menu is displayed where the formatting takes place and is pasted into the clipboard.

User Settings

Use Alias as the field's source name

Will use the alias name (at the right of "AS") from your source fields as your new source fields.

e.g. [SourceField] AS [SourceAlias] -> [SourceAlias] AS [OutputAlias]

Key Prefix

The character(s) used to identify the key fields in Qlik. Formatting will be handled differently here as the Prefixing will be done AFTER (the right) the key prefix to avoid breaking the key formatting.

e.g. Prefixing a key field with "Customer." will generate this: [%MyKeyField] AS [%Customer.MyKeyField]

Ignore formatting on Key Fields?

Fields starting with the identified key will NOT be formatted.

Comma Position

Places the comma either at the start or end of the line.

Field Delimiter

Should the field delimiters be double quotes or square brackets.

Replace characters

Find what: The character(s) you are looking to replace. Multiple characters can be replaced at once.

Replace with: Replace all occurrences of the character(s) in the fields.

Insert a space before capitals

Will insert a space before each capital letter in the fields, except for the first character.

e.g. [MyNewField] -> [My New Field]

Change Case

Applies a case change to all the fields.

Uppercase: Replaces each lowercase letter with a corresponding uppercase char.

Lowercase: Replaces each uppercase letter with a corresponding lowercase char.

Capitalize: The first letter of each word will be in uppercase.

Subfield the field names?

Extract substring components from a parent string field, where the original record fields consist of two or more parts separated by a delimiter.

The function can be used, for example, to extract the column name in a specific language if the field is multilingual.

*e.g. Applying a subfield of 3 with a delimiter of '/' [Client/Cliente/Customer] -> [Customer]

Delimiter: A character within the input text that divides the string into component parts.

Field no: Specifies which of the substrings of the parent string text is to be returned. Use the value 1 to return the first substring, 2 to return the second substring, and so on.

Add Suffix/Prefix?

Adds an affix, either placed before the field (prefix) or at the end (suffix). Useful when reusing the same dimension over and over for multiple scenarios.

e.g. Using the customer dimension where a customer may be a Ship To or Bill To customer.

Prefix : [Customer Name] -> [ShipTo.Customer Name]

Suffix : [Customer Name] -> [Customer Name.ShipTo]

Affix: The text that will be used as an affix. Make sure to add a space to your affix if you'd like the new string to remain spaced out.

 

Visit the Stores:

https://addons.mozilla.org/en-US/firefox/addon/sensefieldformatter/

https://chrome.google.com/webstore/detail/sense-field-formatter/eemcdboengmokjdklikamefkocdiakho

Visit my GitHub: https://github.com/MichelLalancette/SenseFieldFormatter

Version history
Last update:
‎2022-07-26 09:02 PM
Updated by:
Contributors