Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Create a dynamic schema with the fields “Survey ID”, “Session ID”, “Survey Data”, and “Survey Info” and name it. See, create a schema

The following sample schema code saves data of a partial survey.

...

The Dynamic Data manager fetches the data that matches the surveyId and the sessionId from the database.

Ensure that you select the correct schema.

...

Set partial-survey data

This function node constructs the survey info such that the survey starts from where the user left off.

...

Code Block
var _ = global.get('lodash');
msg.payload.originalRequest.data.surveyIDsurveyId=msg.req.query.surveyIDsurveyId;
//to support the session ID from query Param
msg.payload.sessionId = msg.req.query.sessionId || msg.payload.sessionId;
var querySessionId = _.get(msg, 'req.query.sessionId', null);
if (querySessionId) {
    _.set(msg, 'payload.originalRequest.data.sessionId', querySessionId);
}

...