setting up default field filter in a form?

adamEthan
adamEthan Member Posts: 104
hey everyone. im new to modifying forms, but ive been making custom reports for awhile now.

anyways i want to modify our analysis by dimension so that when you open it, the different filters etc are already set as default. essentially we want different directors/vice-presidents to use the AbD, but we only want them to see what they are associated with. i intended on copying the AbD and creating new ones with their specific filters defaulted for each person.

this is proving to be a bit more difficult than i expected.

Comments

  • DenSter
    DenSter Member Posts: 8,307
    What you are looking for is to store a default filter as part of a user setup. Then to set the filter on the form you will need to program the OnOpen trigger to get the filter associated with the user, and then set the filter in the right filtergroup. I believe the one for form view is filtergroup 1, but you'll have to read up on that in F1 help.

    - add filter to User Setup table, so you can associate it with the right user
    - program OnOpen to retrieve the filter from User Setup
    - apply the filter in the right filtergroup, so the user can't modify the filter
  • adamEthan
    adamEthan Member Posts: 104
    Thanks for the quick reply!

    I was just reading about the "OnOpenForm" Trigger in the "Application Designer" guide

    We don't use windows logins, just database logins.. i'll have to look into the user setup you mentioned also.

    Thanks again!

    -adam

    ( Is there a reason why I can't hit F9 or view the editor when viewing a form in the object designer? )
  • andreof
    andreof Member Posts: 133
    ( Is there a reason why I can't hit F9 or view the editor when viewing a form in the object designer? )

    This is a license issue
    Andre Fidalgo
    My world: Dynamics NAV,SQL and .NET

    CEO at Solving Dynamics
    http://www.solvingdynamics.com
  • DenSter
    DenSter Member Posts: 8,307
    If the C/AL editor doesn't open when you hit F9, then you don't have it on your license.

    The User Setup table is used regardless of the authentication type. It's in Administration, application set up.
  • adamEthan
    adamEthan Member Posts: 104
    hey guys.

    coincidentally i *magically* came across a full license.

    my user setup only contains date ranges etc, no filtering options?

    i think i can handle this on my own, but any advice would be appreciated. essentially you guys set me in the right direction
  • DenSter
    DenSter Member Posts: 8,307
    Yeah I've caught a customer *magically finding* our development license on a USB stick while objects were transferred. Just so you know, using a license that doesn't belong to you is *not very legal*.