Crazy_About_JDE
Well Known Member
Set Grid Cell Error flags all cells in the grid\'s column
Hello, all-- This is my first time using the Set Grid Cell Error system function. It is highlighting all the cells in the grid column rather than just the one in error. When I correct the cell, the Clear Grid Cell Error system function only clears the one I corrected while leaving all the other cells in red. What have I missed? Is there a better approach?
Thank you in advance for your consideration.
-Tim
Details
I am adding a warning message to P4210's Sales Order Detail Revisions form W4210A that will appear if the Quantity Ordered (UORG) is greater than 1,000.
Setup
(1) created an error message data item 554210A with Error Level = 2 (Warning)
(2) Added event rules to the grid column's Col Is Exited event to display the message:
If GC QuantityOrdered is greater than "1000"
Set Grid Cell Error(FC Grid, <Currently Selected Row>, GC QuantityOrdered, "554210A")
End If
(3) Added event rules to the grid column's Col Exited & Changed Inline event to clear the message:
If GC QuantityOrdered is less than or equal to "1000"
Clear Grid Cell Error(FC Grid, <Currently Selected Row>, GC QuantityOrdered, "554210A")
End If
Results
Run P4210, add a new order, then type a few lines with valid quantities. When I type 1001 in the quantity ordered and advance to the next column:
(1) The warning message Quantity Exceeds 1,000 correctly appears in yellow text in the status bar
(2) All the cells in the Quantity Ordered column are highlighted red. (This is not desirable.)
(3) When I go back to the cell and change the value to 10 then press Tab, the red color vanishes for the current cell but leaves all the other cells highlighted red, which is also undesirable.
Notes
<ul type="square">[*]The grid column is linked to the business view column UORG
[*]I am not doing any overrides
[/list]
Hello, all-- This is my first time using the Set Grid Cell Error system function. It is highlighting all the cells in the grid column rather than just the one in error. When I correct the cell, the Clear Grid Cell Error system function only clears the one I corrected while leaving all the other cells in red. What have I missed? Is there a better approach?
Thank you in advance for your consideration.
-Tim
Details
I am adding a warning message to P4210's Sales Order Detail Revisions form W4210A that will appear if the Quantity Ordered (UORG) is greater than 1,000.
Setup
(1) created an error message data item 554210A with Error Level = 2 (Warning)
(2) Added event rules to the grid column's Col Is Exited event to display the message:
If GC QuantityOrdered is greater than "1000"
Set Grid Cell Error(FC Grid, <Currently Selected Row>, GC QuantityOrdered, "554210A")
End If
(3) Added event rules to the grid column's Col Exited & Changed Inline event to clear the message:
If GC QuantityOrdered is less than or equal to "1000"
Clear Grid Cell Error(FC Grid, <Currently Selected Row>, GC QuantityOrdered, "554210A")
End If
Results
Run P4210, add a new order, then type a few lines with valid quantities. When I type 1001 in the quantity ordered and advance to the next column:
(1) The warning message Quantity Exceeds 1,000 correctly appears in yellow text in the status bar
(2) All the cells in the Quantity Ordered column are highlighted red. (This is not desirable.)
(3) When I go back to the cell and change the value to 10 then press Tab, the red color vanishes for the current cell but leaves all the other cells highlighted red, which is also undesirable.
Notes
<ul type="square">[*]The grid column is linked to the business view column UORG
[*]I am not doing any overrides
[/list]