Page 1 of 1

Notes

Posted: January 24th, 2020, 3:17 pm
by AriSilva
Is there a way, in batch mode, to get all the notes for all the fields in the questionnaire in csdb file, using 7.3 version?

Re: Notes

Posted: January 27th, 2020, 2:35 am
by Enkhbayar
Yes, I exported it as below.
A = csdb file

Code: Select all

PROC DUMMY2_FF

numeric num = sqlquery( A , entrySessions,"select cases.key, notes.field_name, notes.record_occurrence, notes.content from notes join cases on notes.case_id = cases.id");

	do numeric ctr = 1 while ctr <= num
		
			NOTES_A.ID=entrySessions(ctr,1);
			NOTES_A.FIELD=entrySessions(ctr,2);
			NOTES_A.RECORD_OCC=tonumber(entrySessions(ctr,3));
			NOTES_A.NOTES_NOTE=entrySessions(ctr,4);
			writecase(NOTES_A);


	enddo;

Re: Notes

Posted: January 27th, 2020, 8:50 am
by AriSilva
Thank you, but excuse me my ignorance on the subject:
In this example what is entrySessions, and NOTES.A

Re: Notes

Posted: January 27th, 2020, 9:14 am
by josh
You can also convert the csdb to text and the .csnot is generated which you can read with a notes dictionary. You can generate the notes dictionary using the dictionary macros.

Re: Notes

Posted: January 27th, 2020, 9:18 am
by Enkhbayar
AriSilva wrote: January 27th, 2020, 8:50 am Thank you, but excuse me my ignorance on the subject:
In this example what is entrySessions, and NOTES.A
NOTES_A = a dictionary which is going to store notes.
entrySessions = result of sqlquery