Post new topic Reply to topic  [ 6 posts ] 

Board index : TeleFlow Forums : TeleFlow Designer & Simulator

Author Message
 Post subject:
PostPosted: Wed Apr 27, 2005 8:30 pm 
Offline

Joined: Sun Dec 05, 2004 5:37 pm
Posts: 10
How can I count the number to expressions in a string variable. For instance, if I have @TEXT=this sentence has 5 words, what can I do so that I can specify @COUNT_TEXT=5. I also need to be able to specify what word is in which position, i.e. @COUNT1=this, @COUNT2=sentence, etc. <br> <br>Please help.


Back to top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 28, 2005 6:42 am 
Offline

Joined: Mon Mar 15, 2004 3:55 pm
Posts: 35
Location: USA
I would suggest using the parse step to locate the space character that separates the words then use the math step to extract them.


Back to top
 Profile  
 
 Post subject:
PostPosted: Mon May 02, 2005 5:57 pm 
Offline

Joined: Sun Dec 05, 2004 5:37 pm
Posts: 10
Thanks for the tip. At first thought, this sounds rather tedious. Any more direct way of achieving the same? In any case, I'd have a go at it and see how it goes. <br> <br>Thanks!


Back to top
 Profile  
 
 Post subject:
PostPosted: Tue May 03, 2005 9:36 am 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
Instead of using math to extract each variable, use the Parse step as follows: <br> <br>Set <br> <br>@MY_TEXT = <br>Parse @TEXT <br>Delimiting string @SPACE (@SPACE contains a single space character) <br>For occurrence # @COUNT (a count you incremement yourself each time parse successfully retrieves a string) <br> <br>That is a fairly easy way to get the count, and each individual word. What it doesn't do is simplify you @COUNT1 , @COUNT2 process. Could you explain why you are doing this? Perhaps we can provide a better method if we understand the purpose of noting the text at each position. <br> <br>NOTE: You can use parse to immediately give you the text at a particular position by simply setting it up the same way as above, and setting occurrence # to the particular position you are looking for.


Back to top
 Profile WWW 
 
 Post subject:
PostPosted: Wed May 04, 2005 10:00 pm 
Offline

Joined: Sun Dec 05, 2004 5:37 pm
Posts: 10
We're trying to create a sort of a callback application using TF. Users will key-in a string of phone numbers they want to callback on and the system will call them individually, i.e. if user input +1416222222 +16044840604 +44207221111, we need to have @COUNT1=1416XXXXX, @COUNT2=1604XXXX, and @COUNT3=44207XXX, etc. I know it's easier to have callers in the variables in 3 times then to have them in all at once but it's something the customer specifically requested. <br> <br>TF will then pass on these numbers individually to a VOIP server and make 3 outgoing calls.


Back to top
 Profile  
 
 Post subject:
PostPosted: Thu May 05, 2005 9:33 am 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
If you are going to gather all of the numbers into a single variable/string delimited by spaces, and subsequently pull them out of that string one at a time to pass them to something else, I think you can use the method I described. <br> <br>Rather than storing each number to a separate variable, use the Parse for delimiting string method to get the first phone number, do whatever needs to be done to send it the the VOIP server, get the second one, send it the VOIP server, etc. It amounts to the same thing.


Back to top
 Profile WWW 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

Board index : TeleFlow Forums : TeleFlow Designer & Simulator


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Style by Midnight Phoenix & N.Design Studio
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.