Notes

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Notes

Post 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?
Best
Ari
Enkhbayar
Posts: 68
Joined: November 10th, 2014, 11:48 pm

Re: Notes

Post 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;
Last edited by Enkhbayar on January 27th, 2020, 9:21 am, edited 1 time in total.
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: Notes

Post by AriSilva »

Thank you, but excuse me my ignorance on the subject:
In this example what is entrySessions, and NOTES.A
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Notes

Post 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.
Enkhbayar
Posts: 68
Joined: November 10th, 2014, 11:48 pm

Re: Notes

Post 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
Post Reply