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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
JacobTews
Creator
Creator

Title case mapping?

Hello, wonderful Qlik community!

I am interested in pushing some string manipulation from Sense upstream into Compose. Is there an easy way to map an all-uppercase field to a title case? Some strings have multiple words, some a single word, and at least one a hyphen.

For example:

HAMPTON

NEWPORT NEWS

RICHMOND-DOWNTOWN

should result in:

Hampton

Newport News

Richmond-Downtown

 

I suspect the most straightforward solution is a CASE statement, especially since the table in question has only ~20 location names, but I keep thinking there has to be something more elegant and extensible. A broader solution would be nice for name attributes, for example.

Any ideas?

Qlik Compose Qlik Compose for Data Warehouses 

1 Solution

Accepted Solutions
JacobTews
Creator
Creator
Author

Thanks to the quick help of @shashi_holla at Qlik support, here's the solution:

The UDF must be called by its full [database].[schema].[function_name] name in the expression to be used in the Mapping stage.

I hope this is helpful to y'all!

View solution in original post

2 Replies
JacobTews
Creator
Creator
Author

As a follow-up, I currently have a UDF which does the transformation I wish to achieve. Compose seems to have access to it when testing the mapping:

JacobTews_1-1691018592224.png

and even can apply the UDF to the whole table in question (when clicking "Preview Results"):

JacobTews_2-1691018661025.png

 

However, Compose can't find it when validating:

JacobTews_3-1691018738206.png

 

I also tried to reference it as a Reusable Transformation, to no avail:

JacobTews_0-1691018512254.png

 

Is the issue the schema in which the UDF is stored? Or is it something else entirely?

For reference (in case someone knows how to easily translate this into a mapping in Compose), here's the UDF:

JacobTews_4-1691018901518.png

 

Looking forward to hearing what you brilliant folks have to say!

JacobTews
Creator
Creator
Author

Thanks to the quick help of @shashi_holla at Qlik support, here's the solution:

The UDF must be called by its full [database].[schema].[function_name] name in the expression to be used in the Mapping stage.

I hope this is helpful to y'all!