Global Filtering

I need to implement a global filtering method. The customer has 4 companies data in one database, and wants to be able to see one company’s data at a time depending on the company recorded against the user in the user table. We defined Company as global dimension and it is included in all the tables. Rather then writing code to each and every object in the database I would like to have a supervisor object that filters all the tables by company dimension or at least do the filtering in tables so that all objects using the tables will get the filtered data. Has anyone implemented something similar? I could really use inheritance here… Thank you.

You could use 3.01 with the SQL database and put the filter in the Security filter column on the Role’s permissions. This does not give you exactly what you are asking, but it does reduce the need to modify every form object. Of course, a parent object with programmable methods would be much nicer, but for some reason, the C/SIDE developers don’t or won’t give this to us yet. Maybe with the next version. Edited by - Jim Hollcraft on 2001 Oct 09 20:43:46


From a private message: Jim, Thank you very much for your suggestion regarding global filtering. I have Navision Attain 3.01A US Beta 2 with a standard database and the Security Filter doesn’t seam to work. I will try it with the recently released version 3.01. Just as a curiosity, why did you say it has to be a SQL Server database. Is this not suposed to be working with a standard database? Much appreciated. Regards, Carmen Stanciulescu

Carmen, The security filter only works with the SQL database option. Jim.

The closest thing we have to a parent object is Codeunit 1. Functions within this codeunit are called from a large majority of the various other functions. You could look for a “hook” within Codeunit 1 that is accessed appropriately to fit the idea of at least “semi-universal” code for your need. Assuming that’s not feasible to solve your problem (and in a similar case for us it wasn’t), we ended up touching each of the involved objects, putting in a single conditional statement that called a filtering function that we placed in a Codeunit. Dave Studebaker Liberty Grove Software A Navision Services Partner

Hi, right now I am implementing this with one of my customer.I am using Navision Attain’s Responsibility centre Function to Control individual Company Information in the Holding Company . Say For Ex - CAT Holding has CAT - Mauri CAT - France So we have responsibility Centre as Mauri and France and in each of the Customer Card ,Supplier Card, Item Card , and Entry Level have a field which is filtered and controled from the User Setup. Mony

I’ve not done any testing but the Attain Help file section on Viewing Documents from One Responsibility Center contains the following line: Note Users will still be able to view all posted documents and ledger entries, not just those related to their own responsibility center. That would make me think that this may not be the answer to limiting user access to other areas. I’ve not done any testing to verify. Dave Studebaker Liberty Grove Software A Navision Services Partner

Unfortunately the function SETGLOBALFILTER was removed from Navision many years ago , I think the reason was the problems it caused with flow fields and performance. Although there are many ways to solve your issue, in the end (if you don’t want a SQL solution) you may find it best to seperate the companies as Navision companies, then use standard security. _________________________ David Singleton Navision Consultant since 1991 dmks22@home.com___________

Hi David It was nice to see that someone remembered the good old days when SETGLOBALFILTER was available!!. It would have been nice if was still there as we had to make use without it for a similiar functionality to that of Carmen’s. So it was rewarding to see that we did not waste our time with the solution that we had to do in the end. I am a little curious as to what you mean by “if you don’t want a SQL solution”. It there something that the SQL option provides that is not available in the native database? Perhaps you can explain David in a way that us poor consultants can understand _________________________ Wendy O’Connor - co moderator Attain/Financials - End User Questions NOLUG Edited by - woconnor on 2001 Oct 11 01:21:20

Thank you all for taking the time to reply to this topic. I considered every suggestion, and it looks like for the specific requirements that I have, I will have to implement a solution similar to what David Studebaker suggests. Interesting discussion… Carmen

Dear David, You are correct in saying that with the help of Responsibility Centre Reports cannot be viewed. But if we Link the responsibility centre with Global Dimention then we would be able to filter all the Report with the Global Dimention one. I have started this implementation with a small test and demo. Let me know if you see some problem ahead.