Ticket #752 ( Closed )

Short Description Task Variables
Entered By: gaucho When: 2001-05-03 13:04:48 Build: 2.0.10
Categories Type: Question   Department: Product   Category: Not Categorized
Description
Hello,

I have tried to use the "Task.HttpURL" function to retrieve 
the full URL but I can only successfully retrieve only a 
portion of it.

The current URL should be as follows:
http://128.111.173.242:82/surfer/click/HELP?
ScreenID=scheduleofclasses.mainscreen&SessionKey=1_Fre121046
3343_1210842156&C_POS=491

However, the only values I can retrieve are:
/surfer/click/HELP?ScreenID=scheduleofclasses.mainscreen

What options can you suggest to properly retrieve the all 
values of the current URL?

Thanks,

CHuck
Append By: Big Kahuna  When: 2001-05-03 13:45:18  New Status: Pending Customer
Comment
Chuck, the task.httpurl variable will not show you the 
information prior to the "surfer" portion of the url since 
this is always the IP address/DNS name of your Screensurfer 
server and the terminal port which in your case is 
the "http://128.111.173.242:82".  

Now, as to why you are only seeing:

"/surfer/click/HELP?ScreenID=scheduleofclasses.mainscreen"

instead of:

/surfer/click/HELP?
ScreenID=scheduleofclasses.mainscreen&SessionKey=1_Fre121046
3343_1210842156&C_POS=491

How are you displaying the contents of task.httpurl?  are 
you storing the variable value in a user defined 
Screensurfer variable?  If so, possibly the size of the 
variable is too small?
Append By: gaucho  When: 2001-05-03 13:56:41  New Status: Pending IE
Comment
Big Kahuna,

The following code I am using to check for the values are 
as follows:

"Teshow Task.httpURL"

I haven't stored the value in a variable.

Thanks,

Chuck

Append By: Big Kahuna  When: 2001-05-03 14:03:07  New Status: Pending Customer
Comment
Chuck, before I "tap" some additional resources as to why 
you are not seeing the entire URL, can you briefly explain 
to me why you want the entire URL?  Depending on what you 
want this information for, I could possibly provide you a 
workaround....

Thanks.
Append By: gaucho  When: 2001-05-03 14:34:59  New Status: Pending IE
Comment
We are in the process of releasing a few applications using 
one screen surfer.

Since these applications will all have the ability to 
timeout, I would like to display an appropriate message for 
each separate application using the INVALID section.  
However, once an application times-out I can no longer 
retrieve any session variables. Therefore, I determine the 
session/connection number from the URL (by the use of a 
FindText() calculation) so that I may be able to display a 
webpage appropriate to that particular application.  Being 
able to determine the sessionID/Connection number from the 
httpURL will allow us to do so.  The "httpreferrer" 
function, which displays all values, could also be used, 
but we've run into more problems using this method.

Thanks.
Append By: WindSurfer  When: 2001-05-03 15:13:57  New Status: Pending Customer
Comment
The reason the URL isn't fully there is that the holding-
place for it in the Task area is not that big...we can 
increase it in future releases, but the real solution is 
for you to just look at the sessionkey--you can use the 
WebText("sessionkey") function to do this...

But, then you need to parse-out the session number--to do 
this, use a UserTask variable, like:

<tedeclare var UserTask.SessionID Integer>
<tedeclare var UserTask.Offset Integer>
<tedeclare var UserTask.Key text 20>
....
In the invalid section:
<teset UserTask.Key=WebText("sessionkey")>
<teif UserTask.Key!="">
 <teset 
   UserTask.Offset=
       FindText(UserTask.Key,"_")>
 <teset 
   UserTask.SessionID=
       TextLeft(UserTask.Key,UserTask.Offset)>
 <!-- Now have original SessionID in UserTask.SessionID-->
<teelse>
 <teset UserTask.SessionID=-1>
</teif>
Append By: gaucho  When: 2001-05-04 13:46:51  New Status: Closed
Comment
Thanks I'll give it a try.

Chuck