Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
richters
Partner - Contributor III
Partner - Contributor III

Load help text of objects

Hi all,

for a documentation of an application I do need all the Help texts of every object.

Until now, I used the document analyzer of Rob Wunderlich ( http://robwunderlich.com/downloads/ ) and it worked fine.

What I now need is add the help texts to the objects.

Anyone now where I can find it?

Thanks!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can do it with a macro. Here's an example that simply the ObjectID and its help text:

sub GetHelpText

msg = ""

Objects = ActiveDocument.ActiveSheet.GetSheetObjects

    For i = lBound(Objects) To uBound(Objects)

    OT = Objects(i).GetObjectType

    OID = Objects(i).GetObjectID

    set prop = Objects(i).GetProperties

    Select Case OT

        Case 1,2,3,4,6,7,8,9,18,34,35

            msg = msg & OID & " " & prop.Layout.Frame.HelpText.v & chr(10)   

        Case 10,11,12,13,14,15,16,20,21,22,23,27,28

            msg = msg & OID & " " & prop.GraphLayout.Frame.HelpText.v & chr(10)

        Case 5,19

            msg = msg &  OID & " " & prop.Frame.HelpText.v & chr(10)   

        Case else

    End Select

   

    next

msgbox msg

end sub

Note! I haven't checked every chart type (object types 10,11,12,13,14,15,16,20,21,22,23,27,28), but I expect they all use the same interface and that the above works for all chart types.


talk is cheap, supply exceeds demand

View solution in original post

9 Replies
MayilVahanan

HI

HelpText.bmp

Are you mentioning this?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
richters
Partner - Contributor III
Partner - Contributor III
Author

Hi,

exactly!

MayilVahanan

Hi

If you achieve requirement, pls close this post by mark as assumed answer or correct answer..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
richters
Partner - Contributor III
Partner - Contributor III
Author

Well, I know where to find the help texts in the objects. What I really wanted was an analysis of all help texts in all objects of the document.

A table like SheetName - ObjectName - HelpText.

With the Document Analyzer of Rob Wunderlich I can get the first two columns but I need to know how to load the helptexts ...

Gysbert_Wassenaar

You can do it with a macro. Here's an example that simply the ObjectID and its help text:

sub GetHelpText

msg = ""

Objects = ActiveDocument.ActiveSheet.GetSheetObjects

    For i = lBound(Objects) To uBound(Objects)

    OT = Objects(i).GetObjectType

    OID = Objects(i).GetObjectID

    set prop = Objects(i).GetProperties

    Select Case OT

        Case 1,2,3,4,6,7,8,9,18,34,35

            msg = msg & OID & " " & prop.Layout.Frame.HelpText.v & chr(10)   

        Case 10,11,12,13,14,15,16,20,21,22,23,27,28

            msg = msg & OID & " " & prop.GraphLayout.Frame.HelpText.v & chr(10)

        Case 5,19

            msg = msg &  OID & " " & prop.Frame.HelpText.v & chr(10)   

        Case else

    End Select

   

    next

msgbox msg

end sub

Note! I haven't checked every chart type (object types 10,11,12,13,14,15,16,20,21,22,23,27,28), but I expect they all use the same interface and that the above works for all chart types.


talk is cheap, supply exceeds demand
IAMDV
Luminary Alumni
Luminary Alumni

Hi Richters,

I understand that you are going to use the Help Text for documentation and are you using this for expressions/calculations? If yes, I prefer different approach to maintain the Help Text. I understand that I'm not providing a solution for your question but just giving something to think about...

  • Always write your expressions in Variable and create these variables & expression in script
  • Comment your expressions/variables something like this...

         Let v_Exp_TotalSales          =     Sum(Sales)     //Using Sales filed to calculate total sales...blah blah blah

  • Now you can use Subfield function and use the variable to extract the Help Text

This means you can have your Help Text in one place and if you are developing multiple applications with same calculations then you can store this QVW calculation file and call it whenever you need. It's easy to maintain and update only one place. And finally you can easily export the script and variables to get the calculations and Help Text. Just trying to mimic Object Oriented Programmings!!

I hope this helps!

Cheers,

DV

www.QlikShare.com

Gysbert_Wassenaar

Nice trick, but you will need to put your expression in quotes for this to work.

     Let v_Exp_TotalSales   =   'Sum(Sales)   //Using Sales filed to calculate total sales...blah blah blah';

For completeness, SubField(v_Exp_TotalSales,'//',2) will return the comment part of the variable.



talk is cheap, supply exceeds demand
IAMDV
Luminary Alumni
Luminary Alumni

Thanks Gysbert. Totally agreed, you need the single quotes and most of the time ASCII functions. That was just a Tipping Point and you can take it from there on.

BTW - I like your contributions on the community. Good job

Good luck!

Cheers,

DV

www.QlikShare.com

richters
Partner - Contributor III
Partner - Contributor III
Author

Hi,

this macro is what i searched. I worked on the Document Analyzer the same time and found out that it creates XML-files with all properties of all objects a temporary folder. I just included these files in the analyzer like:

for each File in filelist ('C:\Users\***\AppData\Local\Temp\qvwork\****\Document\*')

Object_Properties:

LOAD DISTINCT

    text(left(right('$(File)',len('$(File)')-index('$(File)','\',-1)),len(right('$(File)',len('$(File)')-index('$(File)','\',-1)))-4)) as Objectname

FROM $(File);

next File;

for each File in filelist ('C:\Users\***\AppData\Local\Temp\qvwork\****\Document\*')

join (Object_Properties) LOAD

    text(left(right('$(File)',len('$(File)')-index('$(File)','\',-1)),len(right('$(File)',len('$(File)')-index('$(File)','\',-1)))-4)) as Objectname,

    [Layout/Frame/HelpText/v] as Helptext

FROM $(File) (XmlSimple, Table is [QVObjects/TableBoxProperties]);

next File;

for each File in filelist ('C:\Users\***\AppData\Local\Temp\qvwork\****\Document\*')

join (Object_Properties) LOAD

    left(right('$(File)',len('$(File)')-index('$(File)','\',-1)),len(right('$(File)',len('$(File)')-index('$(File)','\',-1)))-4) as Objectname,

    [GraphLayout/Frame/HelpText/v] as Helptext

FROM $(File) (XmlSimple, Table is [QVObjects/GraphProperties]);

next File;

left join (Object_Properties)

LOAD

Objectname,

Objectname as ObjectId

Resident Object_Properties;

in the Clean-up register in Script. Then you can create a table which shows the helptext for every object easily.

Thanks for your help everyone.