Show factbox fields depending on values in field

MGoosen
Member Posts: 17
Hello everyone,
I'm trying to make the fields in a factbox visible/not visible depending on the values in the source table.
For example; if the source code is "extern", the field should be visible in the factbox and otherwise the field shouldn't be.
I created boolean global variables and set those in the Visible properties of the fields and I set those global variables to FALSE in the OnInsert trigger of the factbox. Next I put code in the OnAfterGetRecord trigger of the factbox to set the variables to TRUE depending on the condition (with a CASE statement).
Right now all fields are not visible, so the code in the OnInsert trigger works. But the code in the OnAfterGetRecord isn't and I don't know how to proceed.
Is it possible what I'm trying and if so how can it be done?
Thanks anyway.
I'm trying to make the fields in a factbox visible/not visible depending on the values in the source table.
For example; if the source code is "extern", the field should be visible in the factbox and otherwise the field shouldn't be.
I created boolean global variables and set those in the Visible properties of the fields and I set those global variables to FALSE in the OnInsert trigger of the factbox. Next I put code in the OnAfterGetRecord trigger of the factbox to set the variables to TRUE depending on the condition (with a CASE statement).
Right now all fields are not visible, so the code in the OnInsert trigger works. But the code in the OnAfterGetRecord isn't and I don't know how to proceed.
Is it possible what I'm trying and if so how can it be done?
Thanks anyway.
0
Comments
-
Hello,
Have you tried to put your code in the OnAfterGetCurrRecord?0 -
put them in a group and the set the visible on the group. And make sure the boolean is true in the OnInit.0
-
Hello,
No, not until you suggested it.
Unfortunately, it doesn't work either.0 -
The combination of putting the fields in a group and setting the visible on the group with putting the Case statement in the OnAfterGetCurrRecord trigger did the trick.
Thanks for the help everyone.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions