lib/impl/getSubmissions/processListResult.js
function reformatFormIdAndName(submission) {
  var formName = "Unknown";
  if (submission && submission.formId && submission.formId.name) {
    formName = submission.formId.name;
  }

  if (submission && submission.formSubmittedAgainst) {
    formName = submission.formSubmittedAgainst.name;
  }

  submission.formName = formName;
  submission.formId = submission.formId.toString();
  return submission;
}
function reformatFormIdAndName(submission) {
  var formName = "Unknown";
  if (submission && submission.formId && submission.formId.name) {
    formName = submission.formId.name;
  }

  if (submission && submission.formSubmittedAgainst) {
    formName = submission.formSubmittedAgainst.name;
  }

  submission.formName = formName;
  submission.formId = submission.formId.toString();
  return submission;
}
function reformatFormIdAndName ( submission ) { var formName = "Unknown" ; if ( submission && submission . formId && submission . formId . name ) { formName = submission . formId . name ; } if ( submission && submission . formSubmittedAgainst ) { formName = submission . formSubmittedAgainst . name ; } submission . formName = formName ; submission . formId = submission . formId . toString ( ) ; return submission ; }
reformatFormIdAndName - Reformatting the form ID associated with the submission.

@param  {object} submission Submission to process.
@return {object}            Updated submission
reformatFormIdAndName - Reformatting the form ID associated with the submission .