18 Replies Latest reply: Jun 4, 2014 2:20 PM by Colin Albert RSS

    OMIT fields in SA

    Friedrich Hofmann

      Hi,

       

      I have been trying to do this for some time before my involuntary holiday. Now I'm at it again:

      - In one of my apps (personell), there are currently no names visible - for the simple reason that I can only have the names in none of my apps or in all, and the latter is to be avoided.

       

      Now, however, I'd like to introduce names - but with OMIT option in the Section_access so that the names are loaded into the DataModel in the first place for a very restricted group of people only.

       

      In principle, that is no problem: You just use three fields instead of two in the section_access:

      - ACCESS (USER or ADMIN)

      - NTNAME (in this instance, >> domain\firstname.lastname <<)

      - OMIT (name of the field that should not be loaded for this user)

      => Thus, every user gets several lines in the underlying Excel_list (where I list all the entries for the SA) - one per field, at least two
            (first_name, last_name)

       

      <=> For some reason, it does not work: I just tried introducing two of those OMIT_fields for myself - still with ADMIN access - and I checked the spelling of the field_names several times. It is the same everywhere - and I can view the fields from the Section_access, I can view my logon and see that those two fields are listed as OMIT fields - still I can see those names.

       

      Can anyone help me out here?

       

      Thanks a lot!

      Best regards,

       

      DataNibbler

        • Re: OMIT fields in SA
          Tresesco B

          Have you checked- 'Intial Data Reduction Based on Section Access' (Settings->Document Properties->Opning) and uncheck 'Admin Override Security' in the security tab ?

            • Re: OMIT fields in SA
              Friedrich Hofmann

              Hi tresesco,

               

              I have checked those fields in the dialog - I haven't unchecked the override one.

              <=> Wouldn't that be quite dangerous? I'm not working on the "live" app, of course, but still I wouldn't like to lock myself out...

              Best regards,

               

              DataNibbler

                • Re: OMIT fields in SA
                  Jonathan Dienst

                  Hi

                   

                  Rule #1 when developing section access script - ALWAYS make a backup (just in case:))

                   

                  Regards

                  Jonathan

                  • Re: OMIT fields in SA
                    Friedrich Hofmann

                    Hi tresesco,

                     

                    I don't know, it might have to do with the way I do this:

                    - I have a table "SA_temp" that consists of two parts:

                      -  The first part is an Inline_table with just two users

                      -  Then I concatenate a LOAD from an Excel file - with the same fields of course.

                      => Finally, I do a RESIDENT LOAD from that with the keyword "Section access" (written just like that) in front (no
                           blank inbetween) and I actually drop the temp_table - but that, too, is for some reason not done.

                    • Re: OMIT fields in SA
                      Tresesco B

                      Has checking the 'Initial...' resolved the issue? If you are admin, you can go and reset your 'admin override security' option even it is unchecked at the first place. That doesn't lock you outside(if I am not greatly mistaken).

                        • Re: OMIT fields in SA
                          Friedrich Hofmann


                          Hi,

                           

                          no, unchecking it has not resolved the issue - not yet anyway.

                          I guess I know why the table "SA_temp" was not dropped - I had it before the keyword "Section_application" - I just moved it and I'm trying now.

                          However, the basic issue remains - the SA seemingly does not work.

                           

                          P.S.: I'll be ... it seems to be working now! Can it really have been "hanging" on that > DROP TABLE < command that was not executed?

                            • Re: OMIT fields in SA
                              Friedrich Hofmann


                              O_O

                               

                              no, I was looking at the wrong set of listboxes ;-) The fields from SA_temp disappeared now

                              <=> the issue remains: In spite of entering those two name fields as OMIT_fields for myself, I can see them.

                                • Re: OMIT fields in SA
                                  Tresesco B

                                  Try to load it like:

                                   

                                  Section Access;

                                  Load * Inline [

                                  .....

                                  ];

                                  Load * From <Excel Source>;

                                   

                                  Section Application;

                                  ....

                                  //Then no need to drop the table.

                                    • Re: OMIT fields in SA
                                      Friedrich Hofmann

                                      Hi tresesco,

                                       

                                      unfortunately, that does not help things - I can do this and it seems to work fine, but to no avail - I can still see those two names ...

                                      I really don't know what might be going wrong here. That is problematic because if I cannot make sure the names are properly protected - e.g. not available to users who shouldn't see them - I cannot put them into the dataModel in the first place, or I would have to duplicate all the base_data I draw from the database, once with and once without names.

                                       

                                      Well, maybe we'll find out what's going wrong after all.

                                      Best regards,

                                       

                                      DataNibbler

                                        • Re: OMIT fields in SA
                                          Tresesco B

                                          Could you post your sample qvw with sample data?

                                            • Re: OMIT fields in SA
                                              Friedrich Hofmann

                                              Hi tresesco,

                                               

                                              I was afraid we'd get to this point ;-)

                                              Yes, I could - it would be a bit time-consuming, but let's see.

                                              I just got a hint that the reason might be capitalization: Up to now, I've written the field_names to be omitted from the DataModel just as they are written elsewhere in the script, but not all_in_caps, but "normal" - first letter capitalized, the remainder small.

                                              I just changed it to all_caps by using the > as < option - that seems to have worked.

                                              I'll check once more, however.

                                                • Re: OMIT fields in SA
                                                  Colin Albert

                                                  Make sure the field names you are using for OMIT are in capitals, and force the data in that field to uppercase.

                                                   

                                                  The three golden rules of section access.

                                                  Rule 1 UPPERCASE;

                                                  Rule 2 UPPERCASE;

                                                  Rule 3 UPPERCASE

                                                   

                                                    • Re: OMIT fields in SA
                                                      Friedrich Hofmann


                                                      Hi Colin and tresesco,

                                                       

                                                      that seems to have been what was going wrong all the time.

                                                       

                                                      Thanks a lot!

                                                       

                                                      Best regards,

                                                       

                                                      DataNibbler

                                                        • Re: OMIT fields in SA
                                                          Friedrich Hofmann

                                                          Hi,

                                                           

                                                          I just made one more test of this Section_access - and something seems to be wrong:

                                                          - I have the name fields several times under different names as I said

                                                          - One set for instance is labeled "VORNAME1" and "NACHNAME1" (all in uppercase)

                                                          - Another one is labeled "VORNAME5" and "NACHNAME5"

                                                           

                                                          Now, I have tested whether I can successfully introduce these as OMIT fields for myself, in the inline_table I use for the Section_access (the first part of it).

                                                          That seems to work for the set with the #1 - but not for the other one.

                                                          Can someone help me out here once more? I can't spot any difference - it is all in uppercase, I've checked several times.

                                                           

                                                          Thanks a lot!

                                                          Best regards,

                                                           

                                                          DataNibbler

                                                           

                                                          P.S.: Could it be that the numbers confuse QlikView somehow? I'll try with text_suffixes now.

                                                            • Re: Re: OMIT fields in SA
                                                              Friedrich Hofmann

                                                              Hi,

                                                               

                                                              now I attach a qvw and an xls file with some fake personell data to illustrate how it is supposed to work - and doesn't.

                                                              There are two users set up in this qvw:

                                                              - One has the username "superuser" and the password "seeall" and should see all fields

                                                              - The other one has the name "regular", password "seeparts" and he should actually see only the personell_number, but not the name_fields.

                                                               

                                                              Thanks a lot once more!

                                                              Best regards,

                                                               

                                                              DataNibblerj

                                                               

                                                              P.S.: Just thinking, there's one thing I haven't tried - maybe those OMIT_fields just don't work for users with ADMIN access?

                                                                • Re: OMIT fields in SA
                                                                  Friedrich Hofmann


                                                                  It seems that it is also a difference whether you use the combination of USERID and PASSWORD or NTNAME as a means to identify the user.

                                                                  - And then, the NTNAME is a bit tricky, I cannot simply write it in uppercase as it is in lowercase in the system, so it won't be recognized, will it?

                                                                  I'm quite confused about this right now. I won't continue on this until tomorrow.

                                                                  It would be great, however, if someone could come up with another idea about what might be the problem.

                                                                    • Re: OMIT fields in SA
                                                                      Friedrich Hofmann

                                                                      Veeery strange ...

                                                                       

                                                                      I have just opened that sample app I created yesterday to try out whether maybe that OMIT stuff works only with USERID and PASSWORD, not with NTNAME - and guess what I found:

                                                                      In the script, the Section_Access was written with NTNAME, no PASSWORD - still I was prompted for USERID and PASSWORD !?

                                                                       

                                                                      => Does QlikView somehow remember the setting for SA?

                                                                        • Re: OMIT fields in SA
                                                                          Colin Albert

                                                                          NTNAME does not need a password it is checking that the currently logged in user is allowed access to the document. the user is already logged in hence no password is needed.

                                                                           

                                                                          If you are using NTNAME in section access and the current user is not listed as having permissions to access the document in the section access table, QlikView will then show the username & password prompt to allow the user to enter a QlikView username and password to access the document - this is not the user's windows login.

                                                                           

                                                                          If you are being prompted for a username and password, then your NTNAME is not recognised.

                                                                          You can add a textbox using OSUSER() to see how QlikView identified your login name - perhaps the domain is missing.