RE: TeraScript-Talk: Variable questions
Mark, Domain variables are scoped to the entire domain (all requests by all users of the current domain) If you want variables which are linked to a user session, then the user scope is correct. These are persistent for the lifetime of the user session (until loss of the session cookie or 2 hours, whichever comes first). If you are saying that when a user enters a TAF which does not log them in (set the user variables) first, then you will have to somehow bounce them to the login process (eg redirect) Regarding my comment on the branch actions, no I am not talking about the IF/ELSEIF/ELSE actions, they are remaining. There are a set of actions called Branch, Return, Branch and Return. These actions are being replaced with proper procedures and possibly static method calls. Robert -Original Message- From: D Mark Weiss [mailto:dadwe...@mac.com] Sent: Thursday, September 19, 2013 2:47 PM To: TeraScript-Talk@terascript.com Subject: Re: TeraScript-Talk: Variable questions Robert, Thank you. I am still fuzzy on a couple of things. I assign a user variable, several of them, and use them when doing inserts, and updates to identify who did them. So is a domain variable unique to each user? Second, If domain variables persist even across restarts, then how do I check if a variable has expired, which in my case forces the user to re log in? And reset the variables. Do you mean branch actions, as in the if else endif, that you drag down from the tool bar? They are going away? Where can I read about what replaces that? Mark On Sep 19, 2013, at 12:36 PM, "Robert Shubert" wrote: > Mark, > > First, I would recommend using the domain scope, rather than the application > scope. The application scope, as it exists now, will be removed in v8. > > Second, yes, you can <@ASSIGN domain$myVar 'value'> in one TAF and have it > accessible in another. The domain scope is persistent (even across restarts). > > Direct access would be <@VAR domain$myVar> however, you can get away with > just <@VAR myVar> as long as you consider the scope cascade, which is: > > Request -> User -> Application -> Domain -> System > > Therefore if you <@ASSIGN domain$myVar '1'> and <@ASSIGN request$myVar '2'> > > Then <@VAR myVar> will return 2, while <@VAR domain$myVar> will return 1 > because the request scope has a higher preference. > > Another way to solve this problem is to place a branch and return at the top > of each TAF and assign the variables in a common TAF (where you branch to). > This is not a highly recommended solution, however, since branch actions will > eventually be removed from the platform. > > Robert > > -Original Message- > From: D Mark Weiss [mailto:dadwe...@mac.com] > Sent: Thursday, September 19, 2013 10:48 AM > To: TeraScript-Talk@terascript.com > Subject: TeraScript-Talk: Variable questions > > I have created a large app in Witango 5.5 MacOSX Server. It is too large. I > want to split it into several smaller, more manageable apps all in the same > folder. Something I never have done before. I hope to gain a little > responsiveness, if only as I load them to edit them. > > When we log in, several user variables are set, and used all over the app. > > The first thing I noticed is that when I branch to the test app, the user > variables are no longer available. > > So I read up and it appears that I need to use application scope variables to > cross over from app to app. > > So #1- Can I use <@VAR varname> and have it pick up <@assign > application$varname "userstuff"> . > > #2. Do application variables expire like user variables? I currently use user > variables and check for variable time out to force users back to the log in > screen. If not, how do I use multiple tafs in an application and check for > variable time out so that log in is forced after a period? > > Thanks, > > Mark > > > > > > > To unsubscribe from this list, please send an email to > lists...@terascript.com with "unsubscribe terascript-talk" in the body. > > > > > > > To unsubscribe from this list, please send an email to > lists...@terascript.com with "unsubscribe terascript-talk" in the body. > To unsubscribe from this list, please send an email to lists...@terascript.com with "unsubscribe terascript-talk" in the body. To unsubscribe from this list, please send an email to lists...@terascript.com with "unsubscribe terascript-talk" in the body.
Re: TeraScript-Talk: Variable questions
Robert, Thank you. I am still fuzzy on a couple of things. I assign a user variable, several of them, and use them when doing inserts, and updates to identify who did them. So is a domain variable unique to each user? Second, If domain variables persist even across restarts, then how do I check if a variable has expired, which in my case forces the user to re log in? And reset the variables. Do you mean branch actions, as in the if else endif, that you drag down from the tool bar? They are going away? Where can I read about what replaces that? Mark On Sep 19, 2013, at 12:36 PM, "Robert Shubert" wrote: > Mark, > > First, I would recommend using the domain scope, rather than the application > scope. The application scope, as it exists now, will be removed in v8. > > Second, yes, you can <@ASSIGN domain$myVar 'value'> in one TAF and have it > accessible in another. The domain scope is persistent (even across restarts). > > Direct access would be <@VAR domain$myVar> however, you can get away with > just <@VAR myVar> as long as you consider the scope cascade, which is: > > Request -> User -> Application -> Domain -> System > > Therefore if you <@ASSIGN domain$myVar '1'> and <@ASSIGN request$myVar '2'> > > Then <@VAR myVar> will return 2, while <@VAR domain$myVar> will return 1 > because the request scope has a higher preference. > > Another way to solve this problem is to place a branch and return at the top > of each TAF and assign the variables in a common TAF (where you branch to). > This is not a highly recommended solution, however, since branch actions will > eventually be removed from the platform. > > Robert > > -Original Message- > From: D Mark Weiss [mailto:dadwe...@mac.com] > Sent: Thursday, September 19, 2013 10:48 AM > To: TeraScript-Talk@terascript.com > Subject: TeraScript-Talk: Variable questions > > I have created a large app in Witango 5.5 MacOSX Server. It is too large. I > want to split it into several smaller, more manageable apps all in the same > folder. Something I never have done before. I hope to gain a little > responsiveness, if only as I load them to edit them. > > When we log in, several user variables are set, and used all over the app. > > The first thing I noticed is that when I branch to the test app, the user > variables are no longer available. > > So I read up and it appears that I need to use application scope variables to > cross over from app to app. > > So #1- Can I use <@VAR varname> and have it pick up <@assign > application$varname "userstuff"> . > > #2. Do application variables expire like user variables? I currently use user > variables and check for variable time out to force users back to the log in > screen. If not, how do I use multiple tafs in an application and check for > variable time out so that log in is forced after a period? > > Thanks, > > Mark > > > > > > > To unsubscribe from this list, please send an email to > lists...@terascript.com with "unsubscribe terascript-talk" in the body. > > > > > > > To unsubscribe from this list, please send an email to > lists...@terascript.com with "unsubscribe terascript-talk" in the body. > To unsubscribe from this list, please send an email to lists...@terascript.com with "unsubscribe terascript-talk" in the body.
RE: TeraScript-Talk: Variable questions
Mark, First, I would recommend using the domain scope, rather than the application scope. The application scope, as it exists now, will be removed in v8. Second, yes, you can <@ASSIGN domain$myVar 'value'> in one TAF and have it accessible in another. The domain scope is persistent (even across restarts). Direct access would be <@VAR domain$myVar> however, you can get away with just <@VAR myVar> as long as you consider the scope cascade, which is: Request -> User -> Application -> Domain -> System Therefore if you <@ASSIGN domain$myVar '1'> and <@ASSIGN request$myVar '2'> Then <@VAR myVar> will return 2, while <@VAR domain$myVar> will return 1 because the request scope has a higher preference. Another way to solve this problem is to place a branch and return at the top of each TAF and assign the variables in a common TAF (where you branch to). This is not a highly recommended solution, however, since branch actions will eventually be removed from the platform. Robert -Original Message- From: D Mark Weiss [mailto:dadwe...@mac.com] Sent: Thursday, September 19, 2013 10:48 AM To: TeraScript-Talk@terascript.com Subject: TeraScript-Talk: Variable questions I have created a large app in Witango 5.5 MacOSX Server. It is too large. I want to split it into several smaller, more manageable apps all in the same folder. Something I never have done before. I hope to gain a little responsiveness, if only as I load them to edit them. When we log in, several user variables are set, and used all over the app. The first thing I noticed is that when I branch to the test app, the user variables are no longer available. So I read up and it appears that I need to use application scope variables to cross over from app to app. So #1- Can I use <@VAR varname> and have it pick up <@assign application$varname "userstuff"> . #2. Do application variables expire like user variables? I currently use user variables and check for variable time out to force users back to the log in screen. If not, how do I use multiple tafs in an application and check for variable time out so that log in is forced after a period? Thanks, Mark To unsubscribe from this list, please send an email to lists...@terascript.com with "unsubscribe terascript-talk" in the body. To unsubscribe from this list, please send an email to lists...@terascript.com with "unsubscribe terascript-talk" in the body.
TeraScript-Talk: Variable questions
I have created a large app in Witango 5.5 MacOSX Server. It is too large. I want to split it into several smaller, more manageable apps all in the same folder. Something I never have done before. I hope to gain a little responsiveness, if only as I load them to edit them. When we log in, several user variables are set, and used all over the app. The first thing I noticed is that when I branch to the test app, the user variables are no longer available. So I read up and it appears that I need to use application scope variables to cross over from app to app. So #1- Can I use <@VAR varname> and have it pick up <@assign application$varname "userstuff"> . #2. Do application variables expire like user variables? I currently use user variables and check for variable time out to force users back to the log in screen. If not, how do I use multiple tafs in an application and check for variable time out so that log in is forced after a period? Thanks, Mark To unsubscribe from this list, please send an email to lists...@terascript.com with "unsubscribe terascript-talk" in the body.