IncludeInDataSet property for Boolean variable on Pages (2016-2018 nav)

Drakonian
Member Posts: 14
Hello, my question is why should use IncludeInDataSet YES property for Boolean variable on Pages?
If it is Request Page on report it is must or user will get runtime error.
But for some reason Page 1, 21 or etc. use that property for booleans which used on Editable/Visible/Enabled/StyleExpr property.
In the documentation I found this(2016):
Great. But all works fine if IncludeInDataSet = No
I have nowhere found the reasons why should use IncludeInDataSet. No one example when variable works not correctly.
Just words: set plz IncludeInDataSet = Yes for editable/visible/etc.
I'm talking specifically about the versions of 2016-2017-2018. And not about reports request pages.
Hope someone can help me to understand. Otherwise I can not sleep peacefully
If it is Request Page on report it is must or user will get runtime error.
But for some reason Page 1, 21 or etc. use that property for booleans which used on Editable/Visible/Enabled/StyleExpr property.
In the documentation I found this(2016):
https://docs.microsoft.com/en-us/dynamics-nav/includeindataset-propertyRemarks
You must set this property to Yes if the variable is used as the value of the Editable Property, Enabled Property, Visible Property, or StyleExpr Property.
Great. But all works fine if IncludeInDataSet = No
I have nowhere found the reasons why should use IncludeInDataSet. No one example when variable works not correctly.
Just words: set plz IncludeInDataSet = Yes for editable/visible/etc.
I'm talking specifically about the versions of 2016-2017-2018. And not about reports request pages.
Hope someone can help me to understand. Otherwise I can not sleep peacefully

0
Comments
-
Hi @Drakonian, you do need this otherwise it doesn’t work properly when you change the value of your variable. If not set then it will only use the initial value that was set when the page was opened.
As a test create a Boolean variable and set it based on the value of field in the table used on the page - do this on the OnAfterGetRecord of a list page. Then use the variable to set the Enabled or Editable property of one of the fields on the list page (don’t use it for Visible). You’ll find that this only works correctly when the IncludeInDataset property is used.1 -
Hi @Drakonian, you do need this otherwise it doesn’t work properly when you change the value of your variable. If not set then it will only use the initial value that was set when the page was opened.
As a test create a Boolean variable and set it based on the value of field in the table used on the page - do this on the OnAfterGetRecord of a list page. Then use the variable to set the Enabled or Editable property of one of the fields on the list page (don’t use it for Visible). You’ll find that this only works correctly when the IncludeInDataset property is used.
With IncludeInDataSet = Yes or No, it does not matter.0 -
AFAIK, it needed in older versions but not in latest versions.
But I also read that Performance will be low if you set to no while using for editable,visible etc cases.0 -
Just done a quick simple test and found the same. I definitely have had it not working quite right in some circumstances if I don’t set the property, I just can’t remember when.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