On Input change--color Change

Shonatina
Member Posts: 114
hi all,
i want to know ,is there any way we can change the color of the field value when the value is change! i tried using the updatecolorfore codes ijn the format trigger! bt it doesnt produce the result i want.
i have alrecy gone through all the old post. but none is related to what i want. so can can one please suggest another way then the Onformat !
please see the attachment to understand clearly.... thanks
i want to know ,is there any way we can change the color of the field value when the value is change! i tried using the updatecolorfore codes ijn the format trigger! bt it doesnt produce the result i want.
i have alrecy gone through all the old post. but none is related to what i want. so can can one please suggest another way then the Onformat !
please see the attachment to understand clearly.... thanks
smile always
shona
That which you seek inside is that which you find outside
shona
That which you seek inside is that which you find outside
0
Answers
-
sorry it seems my attachment is very big! please see this link
http://dynamicsuser.net/forums/t/33290.aspx
thanks:)smile always
shona
That which you seek inside is that which you find outside0 -
Have you tried calling on the OnAfterValidate trigger UPDATECONTROLS?0
-
thanks for the reply...
how do i do that?smile always
shona
That which you seek inside is that which you find outside0 -
On the OnAfterValidate trigger of your control (the one you are trying to change the colour for) call "CurrForm.UPDATECONTROLS"0
-
Are you saying that after i write the updateforecolor codes in the format trigger, i write this updatecontrols in the after validate trigger too?
thanks.smile always
shona
That which you seek inside is that which you find outside0 -
The control where you have changed the colour on the format trigger also has an OnAfterValidate trigger. Try putting CurrForm.UPDATECONTROLS in the OnAfterValidate trigger of the above mentioned control...0
-
yea did as you told me to...still the same trouble!....smile always
shona
That which you seek inside is that which you find outside0 -
Hey Shonatina, Use this code then check :
OnFormat(VAR Text : Text[1024];)
CurrForm.Name.UPDATEFORECOLOR(temp);
OnAfterValidate()
temp := 643;
CurrForm.UPDATECONTROLS;
(temp is an integer variable here)Zephyr0 -
thanks Zephyr
i tried as you said what happens now is! the value in my entire field is changed on a simple click on that text!smile always
shona
That which you seek inside is that which you find outside0 -
Sona What you exactly want to do ? I thought you want to change color of data when you will change the data of that field, may i right :?:Zephyr0
-
yea you are right.
i think the problem lies in not specficing the specific line. i have generally coded it like this
IF "Conceptual Design(CD)" <> Esttemp."Conceptual Design(CD)" THEN
CurrForm.Cd.UPDATEFORECOLOR(255);
so can anyone tell me how to be specific in this code? ](*,)
thanks.smile always
shona
That which you seek inside is that which you find outside0 -
Isen't it better to just use xRec?0
-
the problem with using xrec is that, once i move out of the field the color changes back to normal. ](*,)smile always
shona
That which you seek inside is that which you find outside0 -
so on the aftergetcurrrecord you have something like
esttemp.copy(xrec);
and then compare any changes to that record.
You could check on the value itself, so that a simple click wouldn't change it
Make sure the esttemp isen't assigned again on an edit.
Perhaps you could check on primary key, if that has changed set it as esttemp.
The only thing then you have to catch is the onrename.0 -
Sog wrote:so on the aftergetcurrrecord you have something like
esttemp.copy(xrec);
and then compare any changes to that record.
You could check on the value itself, so that a simple click wouldn't change it
Make sure the esttemp isen't assigned again on an edit.
Perhaps you could check on primary key, if that has changed set it as esttemp.
The only thing then you have to catch is the onrename.
'm writing my codes in the Onformat trigger! And i did as you said, tried to write the code you asked me to! esttemp.copy(xrec);
but when i wrote this code its giving me error msg. :-k And i have already wriiten CurrForm.UPDATECONTROLS;
thankssmile always
shona
That which you seek inside is that which you find outside0 -
Shonatina wrote:yea you are right.
i think the problem lies in not specficing the specific line. i have generally coded it like this
IF "Conceptual Design(CD)" <> Esttemp."Conceptual Design(CD)" THEN
CurrForm.Cd.UPDATEFORECOLOR(255);
so can anyone tell me how to be specific in this code? ](*,)
thanks.
I tried this on the sales line as a test .. It changes color of the unit cost field if the unit cost field on the sales line doesn't match what's on the item card. It works, is this what you're trying to do?OnFormat(VAR Text : Text[1024];) IF Item.GET("No.") THEN BEGIN IF "Unit Cost ($)" <> Item."Unit Cost" THEN CurrForm."Unit Cost ($)".UPDATEFORECOLOR(255) ELSE CurrForm."Unit Cost ($)".UPDATEFORECOLOR(0); END;
On your code you never set it back to black if it's actually correct - hence the whole column turning.0 -
Thanks harry =D>
Thank you All
it worked \:D/smile always
shona
That which you seek inside is that which you find outside0
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