Hot Topic (More than 10 Replies) @number question (Read 4165 times)
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
@number question
Mar 16th, 2005 at 5:46pm
Print Post Print Post  
I’ve tried to see if anyone has asked this question before and was unable to find an answer, so I’m afraid the answer is probably as simple as it seems. My question is can an application have more than one @number with different values? Thank you for any replies.
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: @number question
Reply #1 - Mar 16th, 2005 at 5:51pm
Print Post Print Post  
I do know how to spell, I also found out Im not supposed  to use that little mark thingy or it looks funny on a post.   Roll Eyes
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @number question
Reply #2 - Mar 16th, 2005 at 5:53pm
Print Post Print Post  
There is only one @Number per application, but @Number is only really supported for Q&A compatibility. You can have as many sequential numbers as you want by using GlobalValue.
http://www.lantica.com/Support/sesame_onesheet_10.html
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: @number question
Reply #3 - Mar 16th, 2005 at 6:19pm
Print Post Print Post  
Thank you Hammer. Your wisdom is only exceeded by your kindness.
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: @number question
Reply #4 - Mar 16th, 2005 at 8:45pm
Print Post Print Post  
Might I proceed the global value with a say ..."A- then the global number" is that possable?
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @number question
Reply #5 - Mar 16th, 2005 at 9:42pm
Print Post Print Post  
Quote:
Might I proceed the global value with a say ..."A- then the global number" is that possable?


Sure. The specifics depend on where you are putting the value but:

MyValue = "A-" + @Str(@GlobalValue("MyNum"))
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: @number question
Reply #6 - Mar 16th, 2005 at 10:35pm
Print Post Print Post  
Quote:
MyValue = "A-" + @Str(@GlobalValue("MyNum"))


Erika,
would not @globalvalue ("MyNum") return only string, so putting @str in front will be redundant? In any case,  it will not affect the final result.  As per my understanding it is required to be converted with @tonumber to number to carry out mathematically calculation.  Just trying to get the proper understanding.

Your write-ups in InsideSesame is very insight provoking and I can hardly wait to go directly to your contribution first. Even a small tip from you makes a big difference.  You are just great in imparting clarity to difficult concept. Thank you.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @number question
Reply #7 - Mar 16th, 2005 at 10:44pm
Print Post Print Post  
Quote:
Erika,
would not @globalvalue ("MyNum") return only string, so putting @str front will be redundant? In any case,  it will not affect the final result.  As per my understanding it is required to be converted with @tonumber to number to carry out mathematically calculation.  Just trying to get the proper understanding.

Yes, this is correct, Bharat. I tend to force type, even when I don't necessarily have to in the particular case. I write a lot of code, and some things just get into your hands. I do it automatically.

You're right. In this case, the @Str() is not really necessary.

Quote:
Your write-ups in InsideSesame is very insight provoking and I can hardly wait to go directly to your contribution first. Even a small tip from you makes a big difference.  You are just great in imparting clarity to difficult concept. Thank you.

Gee, thanks!  Smiley
I'm really glad to that my articles are of value to you.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: @number question
Reply #8 - Mar 17th, 2005 at 3:58am
Print Post Print Post  
my head caught fire after typing in the code that worked by the way thank you, dont know what I said but the computer liked it. and where would I add 
MyValue = "A-" + @Str(@GlobalValue("MyNum"))
to this?      

//only assign the number if
//this is a new record which
//has been changed.

var vNextNum as int

if(@IsNew)
{

    if (@Modified)
    {

        vNextNum =
@ToNumber(@GlobalValue("nextNumber"))
+1
      
       opo = vNextNum
       GlobalValue("NextNumber",
@Str(vNextNum))
    }
}      

forever thankfull
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @number question
Reply #9 - Mar 17th, 2005 at 1:10pm
Print Post Print Post  
I'm taking a guess as to what you are trying to do but, I'd say you should change this line:

opo = vNextNum

... to this:

opo = "A-" + @Str(vNextNum)

This assumes that opo is bound to a Text field, as opposed to a Number field.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
FlipGilbert
Full Member
***
Offline


Running Ver 2.6.4

Posts: 236
Location: Sandy Eggo
Joined: Mar 8th, 2005
Re: @number question
Reply #10 - Mar 17th, 2005 at 2:39pm
Print Post Print Post  
Works great! thank you
  

It's not what a man says that matters or how he says it, but what he does and how he does it.
Back to top
 
IP Logged