how to display the field note with csdb

Discussions about CSEntry
Post Reply
OUM
Posts: 2
Joined: July 15th, 2023, 7:15 pm

how to display the field note with csdb

Post by OUM »

hello my team
I tested the getnote() function to retrieve interviewer notes but it doesn't work
NB : I need to display the notes simultaneously on the supervisor's listings from file csdb
my version is cspro 7.7.0

thank you
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: how to display the field note with csdb

Post by sherrell »

First, are you confident there is a note in your data file for the dictionary element in question? For example, if you open your csdb file in DataViewer, do you see a yellow box next to the field of interest?

Second, are you making a proper reference to it, particularly if it is a repeating field, that you cite the correct occurrence?

If you could either post your logic PROC where the getnote() is located or send us your zipped app we can take a look.

Sherrell
OUM
Posts: 2
Joined: July 15th, 2023, 7:15 pm

Re: how to display the field note with csdb

Post by OUM »

Hello Sherrell,
Thank you very much for your reply.
Regarding your first question: yes, there are notes in the data file

the second: unfortunately, I am not allowed to send the full program,

This is an excerpt from the program:

while loadcase(EPCV_DICT) do

// HHFIN ENREGISTRER LE QUESTIONNAIRE ET FINIR
String xnote=getnote(HHFIN);
if length(strip(xnote)) > 1 then
filewrite(html, "<tr><td> "+ edit("999",ID01) + " </td><td> "+ edit("999",ID02) +" </td><td>" + edit("999",DR) +
" </td><td>"+ strip(xnote)+
"</td></tr>");
endif;

enddo;


close(EPCV_DICT);

Thank you
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: how to display the field note with csdb

Post by sherrell »

Oh, I thought you wanted to display notes on the go/within the current case ("I need to display the notes simultaneously on the supervisor's listings from file csdb"). But it looks like you're looping thru all cases in a file and writing any notes found to an html file. So what exactly are you doing/what is/is not happening?

Is the supervisor selecting a menu option that prompts this html file creation?
Is the file empty? Or does the file have contents (so the "if length(strip(xnote)) > 1 then" test is passing) but the note itself isn't being added?
When exactly does the supervisor view this file, how are you handling that?

You can always send your zipped programs to us at cspro@lists.census.gov, where it will just be viewed by the CSPro team.

Sherrell
Post Reply