Case fill in percentage

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Case fill in percentage

Post by htuser »

Dear all,
I'm thinking about a way to have which percent of each case has been filled. For roster by exemple, before entering, i would have an item who're stored the expected occurrence (rows) to be filled.

My first idea is:
1. To have a metadata table (maybe in Cslog) having Dictionary macro as metadata in two related table having:

1.1) Table_1(simple record)
  • a.- Record_name;
    b.- Item_name
    c.- Item_type (alpha, numeric,date);
    d.- Item_size;
    e.- Item_fill (0:if not fill or 1:if is filled or 99: if skipped);
    f.- ID_items (where ID items are stored)
1.2) Table_2 (multiple Occurrence record);
  • a.- Occurrence_number
    b.- Record_name;
    c.- Item_name
    d.- Item_type (alpha, numeric,date);
    e.- Item_size;
    f.- Item_fill (0:if not fill or 1:if is filled or 99: if skipped);
    g.- ID_items (where ID items are stored)
2. Using Onfocus() global function to insert 0 or 1 or 99 in Table_1, Item_fill column. For Table_2, i would call the inserting function in the
postproc of the Roster.

3. Finally select count where Item_fill =0 or 1 or 99 for having final results.

But, until now, i can't find a way to have dictionary macro as a table...

Waiting for your help for any corrections or better idea.

Thanks in advance,
Last edited by htuser on March 12th, 2019, 6:40 pm, edited 1 time in total.
G.VOLNY, a CSProuser from Haiti, since 2004
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Case fill in percentage

Post by aaronw »

I would recommend a simpler approach. The logic would be application specific, so I would just hard code it in your application. My first cut might just be to break the questionnaire into sections and give each section a weight. For example, if they complete the first two sections then they are 40% complete. If that's not the granularity you want then you can calculate this question by question as you go. I would store the result in a "meta data" record within the application. You'll need to consider what it means if they go backwards.
htuser
Posts: 631
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Case fill in percentage

Post by htuser »

Thank you Aaron for your support who's a very important and intelligent idea.
However:
1.-Greg informed us years ago that, Cspro have an undocumented On_Focus() global function who's executed after Onfocus. It's a field (Item), not level, roster, so i don't see how to use it in sections...
2.- For backwards, maybe, Cspro also have a Kill_Focus() (executed after Killfocus) who can help with.

If Cspro doesn't have either Kill_Focus() and Post_Proc() global functions, we're obliged to write a function able to insert into (in the metadata table)Yes, No, Notappl on each item... and call this on Posproc. Using insert Into on section will be more complicated.

Regarding, my first idea, i need two things:
a) Questionnaire macro data as metadata table in Cslog. It's possible to do it manually, but Josh doesn't advise to create new table in Cslog or Csdb, so the developer team may give us an option to add a part of the questionnaire macro in metadata table.
b) Having not only existing On_Focus() global function, but also, Kill_Focus() and Post_Proc() .

Since the Cspro Developer Team know all Cspro hidden functions, they can help with better approach.
Best Regards,
G.VOLNY, a CSProuser from Haiti, since 2004
Post Reply