I need to be able to set an attribute into a cell (row+column) in a grid datawindow which can be used to highlight or otherwise change the appearance of that cell by means of a datawindow expressions - and which can be read out by a program exporting the data to an excel report so that it can similarly test this value and supply the appropriate display formatting in Excel.
One of the only attributes I know of which can be set and programmatically tested on a cell by cell basis is what can be set using the powerscript SetItemStatus function.
This allows me to set the status by row and/or by column and later use the getitemstatus the value set.
The problem is that i only know of the IsRowModified() function supported in dw expressions and it seems to be missing the very much needed IsColumnModified() equivalent which could be easily used to highlight required entries or fields that were entered.
Ive seen various getarounds - like calling global functions from within the dw expression which in turn call the getitemstatus - something I would probably use as a last resort.
So the question is - is there a simple solution for testing the columns modified status from within a datawindow column's datawindow expression for background and/or text color - or alternately is there another attribute of a specific cell which can be programmatically be set to accomplish the same and be easily retrieved?
See https://community.appeon.com/index.php/qna/q-a/find-out-column-name-in-an-expression
The "#" is not necessary.
I did revert to working on the global function which does a getitemstatus - and the returned value then tested in the background color expression of a cell - however for some reason this works for some datawindows and not others - even with the same code. While I am sure the correct datawindow is tested and I see it running the function in the debugger, for some datawindows the global function does not return datamodifed even when a local script does. Partly this might have to do with the reference to the datawindow from the global function - but not sure. Do you have any suggestions that might sort out how to best get this functional?
- how do you get a reference to the dw in a global function in an attribute of a column?
Have you seen my suggestion on "https://community.appeon.com/index.php/qna/q-a/how-do-i-pass-the-row-and-col-to-a-global-function-from-a-dw-expression?limitstart=0#reply-23076"
I think I found a solution and attache a sample app.
regards