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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using field names as labels

Hi - I have field names that are too long and they have the format of db-name.table-name.column-name. By default, Listbox uses the entire field names as Labels. I would like to exclude the prefix and just use table-name.column-name in my case.  Is there a way to manipulate the field names to remove the prefix?  Thanks for any help!

18 Replies
stigchel
Partner - Master
Partner - Master

I did some searching and testing and I think you can use GetObjectField(0) so in your example of 'abc.xyz' where you want 'xyz' :

=SubField(GetObjectField(0),'.',2)

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Not so undocumented after all. Good find!

See QV Help -> System Functions

Not applicable
Author

You brought up a very good point. At the moment I'm only working with database table and field names.  I'm new to Qlikview, and I'm just experimenting different options.  In order to manage tens of databases, hundreds of tables and thousands of fields in my production environment, I think eventually I need to be able to map the friendly field names in the load script.  Thanks for the help and advice.

Not applicable
Author

You're a genius!  Thanks.  This is what I was asking for at the beginning.

stigchel
Partner - Master
Partner - Master

You're welcome Greg.


If this has answered your question can you please close this thread by marking one of the answers correct? It will help others find a (correct) answer to similar problems and lets other contributing members know that this requires no more attention.

Thanks,

Piet Hein

buzzy996
Master II
Master II

subfield()  is the right option to remove some content form source field.

exp: SubField(SubField(`Authoriser comments`,'</p>',1),'<p>',2) as AuthorisercommentsNew,

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Hi Greg, can you please undo your Correct Answer-assignment and mark the original post by Piet Hein at Re: Using field names as labels.as correct?

Have a look at your OP. The reply marked as Correct now appears inside the frame to form a quick Q&A overview.

Unfortunately the answer that is currently shown - although polite and very relevant - has nothing to do with your original question. A question asking you to mark a correct answer is never the correct answer itself. As the original author, you can always change this assignment.

Thanks,

Peter

Not applicable
Author

Ok Peter. I did it. Hope I got it right this time.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Perfect !