Gary:

Copy the following text into your mouse buffer and paste it into
Notepad:

    function env_ip_var()   
    {   
       var return_value = "<%=request.getRemoteAddr()%>";   
       return (return_value)   
    }   
    function env_hostname()   
    {   
       var return_value = "<%=request.getRemoteHost()%>";   
       return (return_value)   
    }     

Save the file as get_client_info.jsp.

Then copy that file into your SHARED folder on your Midtier.

Then open your form in the Admin tool.  Go to VIEW PROPERTIES, click the
APPEARANCE tab, and click EDIT WEB HEADER CONTENT.  Paste the following
into the field:

<SCRIPT src="/arsys/shared/get_client_info.jsp"
language="Javascript"></SCRIPT>

Save the form.

Then create an active link that runs on SUBMIT or WINDOW OPEN or
whatever that does a RUN PROCESS.  The run process should be this:

javascript.window.F(xxxfield idxxx).DoSet(env_hostname());

Replace "xxxfield idxxx" with the field ID of the field you want to
capture the hostname.  Just put the number--no dollar signs or quotes or
anything else.

Save the AL.  Give it a run.  Should work like a champ.

Let me know if you have any trouble.  I have it working here on every
ticket that's submitted.

Norm
-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Opela, Gary L Contr
OC-ALC/ITMA
Sent: Friday, September 21, 2007 10:11 AM
To: [email protected]
Subject: How to capture a user's computer name in the mid-tier?

** 

I am trying to capture a user's computer name in the mid-tier. I know
that in the user tool you can use the following:

 

$PROCESS$ c:\windows\system32\cmd.exe /c hostname

 

However, that doesn't work in the mid-tier as you can not use a
$PROCESS$ in the mid-tier.

 

Any ideas?

 

Thanks,


Gary Opela, Jr

Sr. Remedy Developer

Leader Communications, Inc.

405 736 3211

 

__20060125_______________________This posting was submitted with HTML in
it___ 

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to