Search the web
Sign In
New User? Sign Up
NADUG · North American Dimensions User Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
AutoAnswer in mrStudio   Message List  
Reply | Forward Message #36 of 164 |
We have found that while mrStudio provides a huge advantage with the
AutoAnswer tool, it has a hard time completing in most of our
scripts. The main problem arises from the fact that if you perform
custom validation on a question or series of questions, mrStudio is
not "smart" enough to answer the question properly and thus fails
during its data generation.

Some of our initial solutions caused a lot of headache to implement
and also posed the potential of launching a study into field
with "AutoAnswer" logic which would cause bad data collection. The
nice and simple solution would be to have a native IOM property that
would tell you if the program was running in AutoAnswer mode or not;
however, this feature is not within the IOM feature set.

We found that by creating our own property we can achieve this same
logic:
dim propAutoAnswer
set propAutoAnswer = IOM.Properties.CreateProperty()
propAutoAnswer.Name = "isAutoAnswer"
propAutoAnswer.Value = false
IOM.Properties.Add(propAutoAnswer)

Now you can access the property like so:
IOM.Properties["isAutoAnswer"].Value

Now, everywhere you have access to the IOM, you have access to the
isAutoAnswer property and can adjust your logic accordingly.
However, one of the most common complaints we get is how long our
variable names are or how "deep" into objects we have to traverse to
get logic. To remedy this we also created a local dim variable
called isAutoAnswer in the main routing section. This is the
variable which the programmer would edit if about to run AutoAnswer:
dim isAutoAnswer
isAustoAnswer = false

One of our concerns though is maintaining the same value for both
the local dim variable in the routing as well as the property. In
addition, we want to ensure that there is NO possibility of a study
going live with isAutoAnswer set to true. To remedy this we place
the following logic:

if (IOM.Info.IsDebug) then IOM.Properties
["isAutoAnswer"].Value = isAutoAnswer
isAutoAnswer = IOM.Properties["isAutoAnswer"].Value

The first line only sets the isAutoAnswer property IF in mrStudio,
if you are are on the server this line never executes and as a
result the default value of false (set when we created the custom
property) will remain. The second line ensures that the local dim
variable in the routing is in sync with the IOM property. IF the
programmer left the value of isAutoAnswer = true on the server, then
the IOM.Properties["isAutoAnswer"] would not be set and remain
false, then the isAutoAnswer value is forced to false and all logic
would run properly.

With these two methods you can now run logic in both the main
routing and any function/sub which has the IOM passed to it (this
includes validation functions).
Routing example:
If isAutoAnswer then q1.Validation.Function = "q1Validate"
q1.Ask()

Function example
Function ValidateSum(Question, IOM, Attempts)
If IOM.Properties["isAutoAnswer"].Value then
ValidateSum = true
Exit Function
End if
...rest of validation...
End Function






Wed Oct 25, 2006 10:10 pm

mailhodge
Offline Offline
Send Email Send Email

Forward
Message #36 of 164 |
Expand Messages Author Sort by Date

We have found that while mrStudio provides a huge advantage with the AutoAnswer tool, it has a hard time completing in most of our scripts. The main problem...
mailhodge
Offline Send Email
Oct 25, 2006
10:14 pm

I'm not sure if you are aware, but IOM does know the difference between: 1) Live 2) Test (use IOM.Info.IsTest) 3) Debug (use IOM.Info.IsDebug) Although this is...
jamey_corriveau
Offline Send Email
Nov 16, 2006
8:07 pm

Thanks for your feedback Jamey. These features (IOM.Info.IsTest and IOM.Info.IsDebug) are useful and we do use them on all of our projects. The concern here...
Bret Hodge
mailhodge
Offline Send Email
Nov 16, 2006
11:50 pm

I've submitted a sug for this... Submitted: mrBug00041169: General: SUG: Implement a property or ... and we do use them on all of our projects. The concern...
jamey_corriveau
Offline Send Email
Nov 20, 2006
7:34 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help