Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to extract field name(s) from an Expression?

Hi there,

I was wondering if there is a way of extracting fields used within expressions for instance Sales from Sum({<Name={'Alex'}>}Sales)?

I need a solution that can be applied on more complex expressions.

Many thanks,

Laleh

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can look at the code in Doc Analyzer to see how I do it. Note that I don't actually parse the fields out of the expressions, but rather look for strings that match existing field names. Not too sophisticated, but it works.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

8 Replies
sunny_talwar

extract it? extract the field name where? Not sure I understand, can you elaborate?

Not applicable
Author

Hi Sunny,

So, I am creating a table of all the expressions and the fields used in those expressions of my application.Something like this:

DataDic.png

Now,I need to have a column that shows the fields used within each expression. Hope that make sense!

sunny_talwar

It sort of does. I have no idea how to do this, but I hope someone else do (I will get to learn something new as well ) May be swuehl‌ or rwunderlich

Best,

Sunny

Nicole-Smith

Are you aware that a tool that does exactly this already exists?

The Document Analyzer (Tools | Qlikview Cookbook) created by rwunderlich‌ will take care of all of this for you.

Not applicable
Author

Hi Nicole,

Thanks for your reply. Yes I am, just want to create a simpler solution for my application as it requires less complex functionality. And,I would learn something new if I could work it out.

Thanks again

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can look at the code in Doc Analyzer to see how I do it. Note that I don't actually parse the fields out of the expressions, but rather look for strings that match existing field names. Not too sophisticated, but it works.

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

Not applicable
Author

Hi rwunderlich‌,

Thanks for the info, I am looking into the Doc Analyzer script. Will get back to you if I need to understand how you did it. Great job I should say

MarcoWedel

‌maybe the Governance Dashboard can help you as well to get an overview of your expressions.

regards

Marco