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
IOM Global Variable   Message List  
Reply | Forward Message #139 of 164 |
Re: IOM Global Variable

All,

Thanks to Rich and Tyler for their helpful posts. I have implemented
the following code, but it seems to not work. I'm wondering if this
is a bug. I'm running mrStudio 4.5. The code below does not seem to
update the IOM.Properties["SectionNumber"].Value from "2" to "1" when
I use the previous button after viewing Q3.

Metadata(en-US, Question, Label)
Section1 "Section A"
info;

Section2 "Secction B"
info;

Q1 "This is my Q1 question text" text;

Q2 "What is your first name?"
text;
Q3 "What is your last name?"
text;
End Metadata

Routing(Web)

Dim SectionHeader[11], Label[11], i, SectionName[11]

'LIST ALL SECTION INFO QUESTIONS BELOW
set SectionHeader[1]=Section1
set SectionHeader[2]=Section2
set SectionHeader[3]=NULL
set SectionHeader[4]=NULL
set SectionHeader[5]=NULL
set SectionHeader[6]=NULL
set SectionHeader[7]=NULL
set SectionHeader[8]=NULL
set SectionHeader[9]=NULL
set SectionHeader[10]=NULL


Sub OnInterviewStart(IOM)
Dim Property
Set Property = IOM.Properties.CreateProperty()
Property.Name = "SectionNumber"
Property.Value = 1
IOM.Properties.Add(Property)
End Sub

Sub OnBeforeQuestionAsk(Question, IOM)
Dim i
For i=1 to 10
if IOM.Properties["SectionNumber"].Value=i then
IOM.Banners[..].Style.Color = "#E5E5E5"
IOM.Banners[..].Style.Font.Size=8
IOM.Banners[..].Style.Font.Family="Helvetica"
IOM.Banners[i-1].Style.Color = "#007D90"
End if
Next
End Sub

for i=1 to 10
if not SectionHeader[i].IsNullObject() then
if SectionHeader[i].Label <> "" then
SectionName[i]="SideBanner" + CTEXT(i)
End if
IOM.Banners.Add(SectionName[i], SectionHeader[i].label)
End if
Next
IOM.LayoutTemplate="Template_DefaultALT.htm"
Set IOM.Properties["SectionNumber"].Value=1

Q1.Ask()

Q2.Ask()

Set IOM.Properties["SectionNumber"].Value=2

Q3.Ask()

End Routing




Sun Jul 20, 2008 9:06 pm

mlamias
Online Now Online Now
Send Email Send Email

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

I am trying to find out how to set a global variable in my Dimensions Script in the routing section using mrStudio. I have declared a variable, SectionNumber,...
mlamias
Online Now Send Email
Jul 20, 2008
3:36 am

Hi, Doing this is not advisable as it can be confusing especially if you try to reuse variable names. In general, global variables are seen as a poor...
thegonz14
Offline Send Email
Jul 20, 2008
7:19 pm

Hi, Tyler, Thanks for the suggestion. This is actually what I ended up doing before your suggestion. I think adding a property works quite well and this is...
mlamias
Online Now Send Email
Jul 20, 2008
8:33 pm

Just so I understand this, Option GlobalVariables makes ALL variables declared global and not just selected variables? I can see why this would be problematic....
mlamias
Online Now Send Email
Jul 20, 2008
8:39 pm

I actually just tried Option GlobalVariables in the routing and it doesn't seem to work in 4.0 (perhaps would in a later version).  Looks like it is meant for...
Tyler Ball
thegonz14
Offline Send Email
Jul 20, 2008
8:57 pm

All, Thanks to Rich and Tyler for their helpful posts. I have implemented the following code, but it seems to not work. I'm wondering if this is a bug. I'm...
mlamias
Online Now Send Email
Jul 20, 2008
9:06 pm

Hi Mark, I can think of a couple of ways to go:- 1) If you want to store the value in the case data you could do the following:- Metadata(en-US, Question,...
spssrich
Offline Send Email
Jul 20, 2008
7:35 pm
Advanced

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