Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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)
Not so undocumented after all. Good find!
See QV Help -> System Functions
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.
You're a genius! Thanks. This is what I was asking for at the beginning.
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
subfield() is the right option to remove some content form source field.
exp: SubField(SubField(`Authoriser comments`,'</p>',1),'<p>',2) as AuthorisercommentsNew,
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
Ok Peter. I did it. Hope I got it right this time.
Perfect !