OnGetAttachmentName()

void OnGetAttachmentName(inFilePath, inName, inQuestionAttachmentCount, inGlobalAttachmentCount)

Description

This callback function is called when attachments are captured and will set their name according to the code

Parameters

The following is a list of parameters the functions receives 

Parameter Type Description
inFilePath string the path of the attachment on the device
inName string the name to set
inQuestionAttachmentCount Int a counter to set the attachments with
inGlobalAttachmentCount Int a global counter to set the attachments with

 

Return Type

void

 

Example

This example will check if the attachment was captured in Chapter 1 and if so it will set the attachment name with the type of the attachment, the variable name of the question and the iteration Index.

function OnGetAttachmentName(inFilePath, inName, inQuestionAttachmentCount, inGlobalAttachmentCount)
{
if (CurrChapter == 1)
{
var retVal = getAttachmentType(inName)+ "_" + VarName(CurrQues) + IterationIndex +"_ATTACH_NUMBER_"+inQuestionAttachmentCount;
return retVal;
}

}

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.