Options

Nav R2 - Prevent user from adding new filters

parambparamb Member Posts: 85
edited 2014-01-23 in NAV Three Tier
Hi All,

The Nav feature to let the user add filter on any database field in the pages and reports are very helpful. But in certain cases, like some reports I have a requirement not to let the user add any more filters than 2-3 fields which makes sense per the requirement.

My question: Is there anyway we can restrict the users from adding filters.

Looking ahead for replies. Thanks in advance for your help.

Comments

  • Options
    Rob_HansenRob_Hansen Member Posts: 296
    If you want them to only be able to filter on a couple fields, you'd need to add custom logic to the report to check filters and error out if they've filtered on fields that they should not. You can use a FieldRef variable to cycle through all fields in the table and check GETFILTERS to see if each field has been filtered...then error out if they've done something they should not.
  • Options
    parambparamb Member Posts: 85
    How to use a FieldRef variable to cycle through all fields. I have created RecordRef using the current record. I have also figured how to create a FieldRef by passing the FiledNo as parameter.But how to make the FieldNo dynamic so that I can loop through all the fields in the table.

    Any help is really appreciated.
  • Options
    Igor_PchelnikovIgor_Pchelnikov Member Posts: 25
    Hi,
    in NAV there is a virtual table called Field so you can add it as variable, apply filter on TableNo and loop through fields to get FieldRef for each and check.

    More information here

    Igor
  • Options
    parambparamb Member Posts: 85
    Thanks.
Sign In or Register to comment.