18 Replies Latest reply: Sep 15, 2016 5:29 AM by Tracy Smart RSS

    AppName?

    Isabelle Timmermans

      Hi,

       

      I want to include my appname in the script as a variable.

      Like this: My app name is Client 1 or Client 2.

      And I want to check in the script which app its is.

      If it is Client 1 the script should load other parts of the same database then if it is Client 2.

       

      I know about Section Access, but this doesn't resolve my problem, because my app is too big. So it gets slow. I just want the possibility to publish the same app a few times with different names and apply rules with that names.

       

      Thanks in advance.

       

      Kind regards,

      Isabelle

        • Re: AppName?
          Mark Ritter

          Can you be more specific as to what you are trying to do?

           

          Would Section Access accomplish what you needed if it wasn't slow?  Or are you trying to accomplish something else with the loading of your data?

           

          Do you know what is making the app slow when using Section Access?

           

          I use Section Access in many of my apps to limit what facilities each user can view.  I am only dealing with about 4M rows of data though.  It is not slow at all.

            • Re: AppName?
              Isabelle Timmermans

              Section access does exactly what I need. But in three months my app, with all the clients, grew to almost 1 GB. I have over 300 million rows. So in 1 year it will be at least 4 GB.

              It is already a bit slow and I don't have the illusion the speed will go up, while adding more data.

               

              Any ideas?

              • Re: AppName?
                Rohit Kumar

                Hi Isabelle,

                 

                What I got by your concern, You have two values or I can say two flags ,Client1 and Client2 and you have two scripts one is for Client1 and Client2 or same script for both values. Now if Client1 value comes in picture at load time then Client1 script will load else Client2.

                 

                This can achieve by where and else : lets take an example:

                 

                Load

                Client,

                Product

                from database

                 

                where  Client= 'Client1'

                 

                else

                 

                Load

                Client,

                Product

                from database

                 

                where  Client= 'Client2'

                 

                and store the both load statement on one single QVD.

                 

                Now if you are try to make a button or input box where you enter Client1 and Client1 will load I donot think this is possible.

                 

                Please let me know if this is not your concern.

                 

                Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

                  • Re: AppName?
                    Isabelle Timmermans

                    I don't want to load both in in one QVD, because it is too big.

                    I want the QVD to throw away the data it doesn't use, but both apps should contain the same visualisations.

                     

                    So i want to make one app where I develope my new visalisation or dataloads and then publish it over multiple apps. I want to make a rule where it throws away the data from other clients, so my apps become smaller.

                     

                    Example:

                    Development app ==> contains all the data = 1 GB, 300 milion + rows

                    Client 1 ==> same as Development app but only with the data of client 1 = 100 MB, 20 million rows

                    Client 2 ==> same as Development app but only with the data of client 2 = 75 MB, 15 million rows

                    Etcetera


                    So i need an identifier for the app, so i can just publish my Dev app over my client apps.

                    In the first section I want to write a piece of code where it says only load data of client X and throw away the rest.

                    I can do that with an "If .. then ..."-statement.


                    Or is there any other way to make this possible, without rewriting the loadscript when i want to publish?


                      • Re: AppName?
                        Rohit Kumar

                        Hi Isabella,

                         

                        Hope you are doing good!

                         

                        I have a best solution for you. See sometimes when you stuck at something so you think its a big issue s solution will also be complex but here its very easy.

                         

                        Lets say you have one app APPBASIC which have two Clients data Client1 and Client2 .Now You want that when user who want to see Client1 data will see only Client1 and same for Client2 but I agree you donot want to do section access , So this is possible as:

                         

                        Go to HUB =>  MY Work and  APPBASIC and duplicate it two times and name them as APP1 and APP1. as try to make the names similar as your can . Now open your APP1 => go to its script editor => add a condition at fact table that where Client = Cleint1 and do the same thing as Client= Client 2. Now APP1 have Client1 data and APP1. have Client2 data and then go to QMC and publish both application APP1 and APP1. in same stream and use security rules and say user who want to see Client1 data will access APP1 and who want to see Client2 data will access APP1.

                         

                        what it is ,Only you know , User will always see one application in the stream and each application has only that client data which you want.

                         

                        Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

                         

                         

                        Rohit Kumar

                          • Re: AppName?
                            Isabelle Timmermans

                            Hi Rohit,

                             

                            Thanks for your reply, it thought of this solution before, but it's not going to work:

                            In your scenerio: I make changes to my basic app every two weeks. So I need to duplicate it two times, and adjust my script (two times) and publish it two times every two weeks.

                            At the moment, that's workable, because I don't have many clients using it (more than 2, but i can manage to do this). But our goal is to have at least 200 clients in 2 years. Then I have to do the duplicate everything 200 times, Adjust the script 200 times and publish 200 times. That is not workable.

                             

                            So I need a stable, workable solution.

                             

                            Kind Regards Isabelle

                            (with an E at the end)

                              • Re: AppName?
                                Rohit Kumar

                                Hi Isabelle,

                                Sorry for the writing mistake at last letter ,yes it's a wonderful name.

                                Nkw you just need to do this thing once , you just need to make two apps client 1 and cleint2 , see you know only there are two Apps but user will see which app they need , simple . Both app will have their own reload task . Own security rules . Why do you think you need to do every time , see first app has condition load for client 1 so it will never load for client 2 . See you can't ignore any data no matter it is for client 1 or client 2 because you need some historic data for comparison like last one year .

                                 

                                Please try to do it or let me know if I am not understood

                                  • Re: AppName?
                                    Isabelle Timmermans

                                    The problem is not the viewing part of the data, the section access works fine for that. The problem is that I have 300 million row and a dataset of 1 GB, while 1 client only needs to see 30 million rows, and his own data will be 100 MB. I want to throw away the data the client doesn't need to see, so my app will become faster (I assume) because there is less data in the app.

                                    So I need a solution which will speed up my app, without too much handling. Will your solution do that?

                                      • Re: AppName?
                                        Rohit Kumar

                                        Hi Isabelle,

                                        If you donot want to do anything on application level , YOu may create two apps Client1 and Client2 app and request your data base administrator for design two views and then you may use them, Isabella Once you load data in to the app no matter you use section access or whatever it will be always there and yes it consume your app efficiency , better way is use where condition in both of the app and use security rule .

                          • Re: AppName?
                            Tracy Smart

                            Hi Isabelle

                             

                            there is system function called DocumentName() that you can query in your script, this will contain the name of the app.

                             

                            Tracy

                            • Re: AppName?
                              Rohit Kumar

                              Hi Isabelle,


                              I think I got your concern, I read it twice and what I understood now, You have one application lets say APP1(6 sheets) and you have two show it to Client1  as Cilent1APP and Client2 as Client2App with diffrent rules like Client1 can see 3 sheets and Client2 will see other 3 sheets. So this is possible as:


                              Make two duplicate of APP1 which are Cilent1APP and Cilent2APP and then create two App Object Access Rule for Cilent1APP and Client2 as Client1 can see first 3 sheets of APP1 with name Cilent1APP and Client2 will see Cilent2APP with other 3 sheets.

                               

                              Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.