Hi All,
Sorry for my vague title, but this is a slightly complex issue I'm wrestling with, and didn't know how to describe it otherwise.
The Challenge:
My team have asked me to create a "quality" score for data completeness on each tab I have in my PageFrame. This is based on certain objects having been populated with data.
Not all objects should be included, so at the base class level, on objects that are to be considered (textbox, spinner, editbox, combobox, etc.) I have created a custom property called lquality which is a logic value .F. (default) or .T.
I then go to the objects I want to include in the quality calculation and set those as .T.
What I then need to be able to do is within the Tab (Page) I need to be able to look at all the objects on the page, and determine if they have an lquality property, and if they do, what state it is in. I also need to count all the .T. values for lquality, and separately count if they have data (i.e. some Value() other than "" or .NULL.
But I haven't the first clue how to interrogate the objects just in that tab. I guess I need 2 accumulators, one like nCountQuality which is incremented every time we find a lquality = .T., and a second nQualityAccumulator which is incremented by 1 when lquality = .T. and EMPTY() = .F. (or something like that?)
This value will then get stuffed into a textbox on the form called txtQuality by assigning a value of 1 to 10 to it based on the % complete (i.e. nQualityAccumulator / nCountQuality > 95% = 10, etc.). I may vary these based on the tab depending on the value of the data itself.
This will become a KPI for our team... if they have low-quality scores means they are not putting in the data that is needed (or not tracking it down), and when they drop below a certain % we will make them go back and collect/enter the data. We're just doing this based on putting info into the field, not really looking at it's quality, but it's a better metric than no metric.
Can anyone help at least guide me in the right direction on how to build this function? (I'll then shove it into my common.prg as a function, and use it on various screens for this kind of stuff in the future).
Many thanks in advance. Hope my description here makes sense. I feel so rusty... I know I should know this stuff.
Best Regards,
Scott
ATS, CDCE, CTIA, CTDC
"Everything should be made as simple as possible, and no simpler."
Sorry for my vague title, but this is a slightly complex issue I'm wrestling with, and didn't know how to describe it otherwise.
The Challenge:
My team have asked me to create a "quality" score for data completeness on each tab I have in my PageFrame. This is based on certain objects having been populated with data.
Not all objects should be included, so at the base class level, on objects that are to be considered (textbox, spinner, editbox, combobox, etc.) I have created a custom property called lquality which is a logic value .F. (default) or .T.
I then go to the objects I want to include in the quality calculation and set those as .T.
What I then need to be able to do is within the Tab (Page) I need to be able to look at all the objects on the page, and determine if they have an lquality property, and if they do, what state it is in. I also need to count all the .T. values for lquality, and separately count if they have data (i.e. some Value() other than "" or .NULL.
But I haven't the first clue how to interrogate the objects just in that tab. I guess I need 2 accumulators, one like nCountQuality which is incremented every time we find a lquality = .T., and a second nQualityAccumulator which is incremented by 1 when lquality = .T. and EMPTY() = .F. (or something like that?)
This value will then get stuffed into a textbox on the form called txtQuality by assigning a value of 1 to 10 to it based on the % complete (i.e. nQualityAccumulator / nCountQuality > 95% = 10, etc.). I may vary these based on the tab depending on the value of the data itself.
This will become a KPI for our team... if they have low-quality scores means they are not putting in the data that is needed (or not tracking it down), and when they drop below a certain % we will make them go back and collect/enter the data. We're just doing this based on putting info into the field, not really looking at it's quality, but it's a better metric than no metric.
Can anyone help at least guide me in the right direction on how to build this function? (I'll then shove it into my common.prg as a function, and use it on various screens for this kind of stuff in the future).
Many thanks in advance. Hope my description here makes sense. I feel so rusty... I know I should know this stuff.
Best Regards,
Scott
ATS, CDCE, CTIA, CTDC
"Everything should be made as simple as possible, and no simpler."