3 Replies Latest reply: Oct 10, 2013 5:30 AM by Stefan Wühl RSS

    What's with COMMENT USING?

    Peter Cammaert


      There seems to be a large discrepancy between some accepted QlikView scripting statements, and the Help & Reference Manual specifications for the same. For instance, the QV Help for COMMENT FIELDS says this (11.20 SR3):

      Help_CommentFields.jpg

      The COMMENT WITH spec seems to be OK.

      However, COMMENT USING has some issues... For example, the following doesn't work. It's not even accepted by the syntax checker:

       

      COMMENT C,D USING MapFieldComments;

       

      although IMHO it conforms to the description. The thing that does work is this:

       

      COMMENT FIELDS USING MapFieldComments;

       

      but that one is nowhere to be found in the specifications. And it has a pretty wide impact.

      For a few other examples, see the document below:

      Oh, and TAG and who knows how many others seem to have the issues.

       

      Anyone knows what's happening or what I'm doing wrong? Thanks

       

      Peter

        • Re: What's with COMMENT USING?
          Stefan Wühl

          Right, the docs seems to be incorrect here (that's not the single instance you've found).

           

          I think you should use it like

           

          COMMENT FIELDS USING FieldCommentMappingTable;

          COMMENT TABLES USING TableCommentMappingTable;

          TAG FIELDS USING FieldTagMappingTable;

           

          IMHO, there is no real use in defining the fields / tables to comment like COMMENT FIELDA, FIELDB USING .. when using a mapping table (which defines the fields / table names anyway).

           

          Hope this helps,

          Stefan

            • Re: What's with COMMENT USING?
              Peter Cammaert

              Thanks Stefan,

               

              I agree with your opinion on usability. But then it's not what works that interests me (we get out of these QlikView situations in any case - thank god for that) but what I have to parse to be able to understand all of QlikView load scripts. Building tools is a bit more difficult than writing functioning scripts.

               

              Rgrds,

               

              Peter

               

              PS a while ago, I submitted an idea to make the QlikView documentation (especially the scripting part) more of an on-line self-correcting, partially user-submitted knowledge base that may include the best of the community examples. You can check it out here (http://community.qlik.com/ideas/2832), and vote if you like it.

                • Re: What's with COMMENT USING?
                  Stefan Wühl

                  Just voted up.

                   

                  I also tend to nag from time to time about QV documentation, I think your idea would be really a big step forward.

                  Besides that, I recommend Henrics QV design blog postings, where you can get more insight into QV inner mechanics.

                   

                  Good luck with trying to understand all QV load scripts, IMHO QV is not as consistent and logical as you expect it.

                  And the documentation is - say - improvable.