Dimensions (Unicom Intelligence) Dooblo Custom Callbacks

Overview

We have enhanced our Dimensions integration and and added new scripting capabilities that will allow you to use in Dimensions as a script and then run it in STG Data Collection app.

In this article you will find the list of all the Properties that are available for you to use.

Callbacks

STG_GetAttachmentName

function STG_GetAttachmentName(Ques,IOM, inName, inExt, inGlobalAttamchentCount, inQuestionAttahcmentCount)
'ques might be null
dim name

dim atcMgr
atcMgr = CreateObject("Dooblo.Attachments")
dim deviceIndex
deviceIndex = iom.Questions["sDeviceIndex"]
'name = makestring("atc_",deviceIndex,"_",inGlobalAttamchentCount, inExt) 'this might create an "interview" unique name
name = makestring("atc_",deviceIndex, inExt) 
dim i
i = 1
while atcMgr.HasAttachment(name) 
name = makestring("atc_",deviceIndex,"_", i, inExt)
i = i + 1
end while

STG_GetAttachmentName = name

end function

STG_OnQuotaFilled

function STG_OnQuotaFilled(Ques,IOM, inBucketName, inBucketID)
'ques might be null
debug.MsgBox(inBucketName)
end function

STG_GetDummyValue

function STG_GetDummmyValue(Ques,IOM)
dim ret 
ret = false
if ques.questionname = "Q2" then 
dim val
val = ranint() mod 3
if (val = 0) then
Ques[{Topic_1}].Q2_Slice.Response = {answer_1}
Ques[{Topic_2}].Q2_Slice.Response = {answer_2}
elseif (val = 1) then
Ques[{Topic_1}].Q2_Slice.Response = {answer_2}
Ques[{Topic_2}].Q2_Slice.Response = {answer_1} 
elseif (val = 2) then
Ques[{Topic_1}].Q2_Slice.Response = {answer_2}
Ques[{Topic_2}].Q2_Slice.Response = {answer_2}
end if
ret = true
end if
STG_GetDummmyValue = ret
end function

STG_GetAttachmentSinkQuestion

STG_GetAttachmentSinkQuestion(origQues,iom, name, extension, silent)

STG_ParentChild
STG_ChildCanceled(IOM, inChildID)
STG_ChildEnded(IOM, inChildID, inSubjectID, inIsCompleted)

STG_OnGPSUpdated
STG_OnGPSUpdated(IOM, Location)

Please click here to view our samples.

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.