0 votes
I am designing a module that will use data collected by an existing program. Would it be possible for my module to access data that the user entered in the other course if both are implemented as separate GuidedTrack programs? Or would both modules have to be combined into a single program?
by (5.8k points)

1 Answer

0 votes
Best answer

There are two general approaches to share data between GuidedTrack programs.

One approach is to use *switch, and have one program for asking questions and other showing answers, for example.

Here is the example: goals one program | GuidedTrack

(Note that saving data between programs works only in Run mode but not in Preview mode, please use 

https://www.guidedtrack.com/programs/6770qms/run to see the example in action)

This approach could be used to show the old answer for every question like this: main: questions and answers. Run mode link.

Another approach is more complicated but can give you a lot of flexibility. It is to use a third-party application (Airtable) for storing and retrieving the data.

Here are two sample programs to save goals and to read them. Here is a link to join the Airtable I used for this example. 

I used email as a key but a better option would be probably to generate a random number and use it as a key for retrieving data. Unfortunately, there is no way to get access to GuidedTrack participant ID from inside the program so we have to use this hacky solution for it.

We also have a guide for GuidedTrack and Airtable integration that covers main points (especially if you are not familiar with Airtable) but is not quite polished yet.

by (5.8k points)
selected by

Thanks for your answer,

Could you make the code of this program accessible? I would like to take a look. Thanks
> main: questions and answers

Hi Kachun,

Sorry about that — I've made main: questions and answers public. :)

*if: not answers
	*switch: questions
		*reset
	
*if: answers
	*switch: questions with answers
		*reset
Welcome to Guidedtrack Q&A, where you can ask questions and receive answers from other members of the community.
134 questions
144 answers
55 comments
40 users