2 Replies Latest reply: Oct 1, 2012 10:12 AM by Peter Cammaert RSS

    Reload changes field names in expressions

    Peter Cammaert

      While trying to build a solution for conditionally showing sheets based on Section Access, I ran into some weird QlikView behavior. See model in attachment. It contains the following simple techniques:


      • The script loads a few rows of sheet permissions. Each row contains a userID, a sheet symbol and an access flag. Only sheets with access permission are listed. For example:


      LOAD * INLINE [

      PCA, SHEET, SH06, 1
      PCA, SHEET, SH07, 1
      PCA, SHEET, SH08, 1
      PCA, SHEET, SH09, 1


      • Using a GENERIC LOAD, the script creates an access flag per sheet.
      • About 11 sheets in this model have a Condition Show-expression like this: sum([SHEETACCESS.SH06]) = 1


      In the default set-up, access permissions work flawlessly. Only sheets 6, 7, 8 & 9 are visible, the others remain hidden.

      However, as soon as I change one of the permissions by replacing the value of a single ITEMNAME, funny things start to happen.


      For example, if I replace ItemName SH08 in the table at the top with SH02 and perform a reload, sheet SH02 will pop up as expected. But sheet SH08 will remain visible as well, showing a total of 5 sheets.


      Closer inspection reveals that the Conditional Show-expression for sheet SH08 has been rewritten: the square brackets are gone, and the expression now looks like sum(SHEETACCESS.SH02) = 1.


      Is this normal behavior, or a bug?

        • Re: Reload changes field names in expressions
          Stefan Wühl

          You, respective your generic load, are changing the field name and QV has some built in intelligence to alter expression to adapt changes to field names. I am currently unsure if you can disable this behaviour somewhere in the properties.


          What about dropping the use of the generic load completely and using something like this in your conditional show sheet expressions:


          =sum({<ITEMNAME = {SH02}>} ITEMFLAG) = 1




            • Re: Reload changes field names in expressions
              Peter Cammaert

              I read a few of those stories about people getting in touch with "QlikView Intelligence" and some of these are quite old. Has anyone ever gotten an end-all-discussions-explanation from QlikTech about this "intelligence"?


              I found out that putting conditional expressions in variables works well too, but neither one of these "solutions" lowers maintenance complexity.


              In any case, thanks for your reply.