Using colours in form fields

RobbieX
Member Posts: 66
Hi there
I need to try and find the best solution for the following scenario:
We have a header form for each container with a sub-form which represents what is to be loaded onto the container.
There is a Function/Get Sales Order Lines list form, that, when it opens, only lists the Sales Orders for the customer for whom the Container is for.
On the Get Sales Order Lines list, there are flowfields which show how many items from an order line have been loaded onto the present container and how many have been already loaded onto another container.
If the 2 flowfields, loadedQty + alreadyLoadedQty = QtyOnSalesOrder then we'd like to be able to give the line, or a field, a colour, to highlight that it is complete.
Filtering using flowfields seems to be too difficult...I've tried a few ideas without success.
Maybe there is a better solution?
Can anyone advise?
Many thanks....
I need to try and find the best solution for the following scenario:
We have a header form for each container with a sub-form which represents what is to be loaded onto the container.
There is a Function/Get Sales Order Lines list form, that, when it opens, only lists the Sales Orders for the customer for whom the Container is for.
On the Get Sales Order Lines list, there are flowfields which show how many items from an order line have been loaded onto the present container and how many have been already loaded onto another container.
If the 2 flowfields, loadedQty + alreadyLoadedQty = QtyOnSalesOrder then we'd like to be able to give the line, or a field, a colour, to highlight that it is complete.
Filtering using flowfields seems to be too difficult...I've tried a few ideas without success.
Maybe there is a better solution?
Can anyone advise?
Many thanks....
Robbiex
0
Answers
-
You can change the forecolor and the fontbold property of each control in the trigger OnFormat()
e. g.:GetForeColor() : Integer CALCFIELDS(loadedQty,alreadyLoadedQty); IF (loadedQty + alreadyLoadedQty) < QtyOnSalesOrder THEN EXIT(256 * 127); // darkgreen EXIT(255); // red GetFontBold() : Boolean CALCFIELDS(loadedQty,alreadyLoadedQty); EXIT((loadedQty + alreadyLoadedQty) = QtyOnSalesOrder); MyControl - OnFormat(Text : Text[1024]) CurrForm.MyControl.UPDATEFORECOLOR(GetForeColor); CurrForm.MyControl.UPDATEFONTBOLD(GetFontBold);
Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 -
If you want to do this for a whole line, you will have to do this for all fields.0
-
Hi Timo & Daniel
That is wonderful....it works perfectly!
I really appreciate your help!Robbiex0 -
The color set by the ForeColor property causes all rows to be displayed in the specified color so if you want to change all the lines at once you can use the property.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