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 #136 of 164 |
Re: IOM Global Variable

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 what I'll use.

Thanks again.

Mark

--- In NADUG@yahoogroups.com, "thegonz14" <thegonz14@...> wrote:
>
> 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 programming practice. It would be better to use a metadata
> question or to add a property with a value to the IOM.Properties
> collection as part of OnInterviewStart to be accessible as
a "global"
> variable.
>
> Dim myProp
> Set myProp= IOM.Properties.CreateProperty()
> myProp.Name = "VariableName"
> myProp.Value = 0
> IOM.Properties.Add(myProp)
>
> Then, you can access the value of this property anywhere in your
> routing or subs/functions with this syntax:
>
> IOM.Properties["VariableName"]
>
> However if you do still want to do this you can declare this as the
> first line of your routing:
>
> Option GlobalVariables
>
> That will make routing dim variables accessible in subs/functions.
>
> Thanks.
>
> Tyler
>
> --- In NADUG@yahoogroups.com, "mlamias" <mlamias@> wrote:
> >
> > 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, using:
> >
> > Dim SectionNumber
> >
> > But I want to make this a global variable so that I can use it
> > throughout the script. I've looked in the DDL documentation and
found
> > little about declaring global variables outside of dms scripts.
> >
> > What I'm trying to do is refer to a global variable in the
> > OnBeforeQuestionAsk Event -- not a question defined in the
metadata
> > section.
> >
> > Does anyone have any suggestions?
> >
> > Thanks.
> >
>





Sun Jul 20, 2008 8:33 pm

mlamias
Offline Offline
Send Email Send Email

Forward
Message #136 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
Offline 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
Offline 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
Offline 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
Offline 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