Page Cntrl Visibility

navuser1navuser1 Member Posts: 1,329
edited 2013-05-29 in NAV Three Tier
Dear All,
Is it possible to show/hide a Page Control(field) on the basis of some field validation ?

Thank you.
Now or Never

Comments

  • geordiegeordie Member Posts: 655
    I think control visibility can be managed only during the opening of the page itself...
  • thegunzothegunzo Member Posts: 274
    Try a Global Variable, boolean with property IncludeInDataset as true. Set this global variable in the Visible property of the object and try to change the value of this variable with code. Perhaps a CurrPage.UPDATE is needed but this should work.
    ________________________________
    Gunnar Gestsson
    Microsoft Certified IT Professional
    Dynamics NAV MVP
    http://www.dynamics.is
    http://Objects4NAV.com
  • geordiegeordie Member Posts: 655
    thegunzo wrote:
    Try a Global Variable, boolean with property IncludeInDataset as true. Set this global variable in the Visible property of the object and try to change the value of this variable with code. Perhaps a CurrPage.UPDATE is needed but this should work.

    I tested it (NAV 2009R2), even with CurrPage.UPDATE, but seems the global variable is checked only during page opening :?
    Sure enough help says "For field and action controls, the variable must be resolved by the OnInit Trigger or OnOpenPage Trigger. ".
  • Johannes_NielsenJohannes_Nielsen Member Posts: 206
    I think I've used it to enable/disable an Page action, triggered by field onvalidate.

    I hav'nt tried on a field though. Do you use the Visible property? Try the Enable property.
    Best regards / Venlig hilsen
    Johannes Sebastian
    MB7-840,MB7-841
Sign In or Register to comment.