void OnGetAttachmentNameEx(inFilePath, inName, inQuestionAttachmentCount, inGlobalAttachmentCount, inType)
Description
This callback function is called when attachments are captured and will set their name according to the code including the ability to use the attachment type
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 |
inType | eAttachmentType | The type of the attachment |
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 OnGetAttachmentNameEx(inFilePath, inName, inQuestionAttachmentCount, inGlobalAttachmentCount, inType)
{
if (CurrChapter == 1)
{
var retVal = getAttachmentType(inName)+ "_" + VarName(CurrQues) + IterationIndex +"_ATTACH_NUMBER_"+inQuestionAttachmentCount;
return retVal;
}
}
Comments
Please sign in to leave a comment.