Absent Member.. Shahboub Absent Member..
Absent Member..
595 views

Get Requester [SM User] IP to append it in Ticket Record

Jump to solution

Hi, All

    I have a business case to get the Ticket requester IP and append this data to ticket record.

 

Any Sugesstions  

 

Mohamed Shahboub

 

Thanks,
Mohamed Shahboub

ITSM Consultant
0 Likes
1 Solution

Accepted Solutions
ALARMus Acclaimed Contributor.
Acclaimed Contributor.

Re: Get Requester [SM User] IP to append it in Ticket Record

Jump to solution

Use FC for "login.DEFAULT"

And set in "initialization expression" next expression:

$lo.user.ip=sysinfo.get("ClientNetAddress")

So now you can use FC for interactions in Calculation (for add)

dev.ip in $file=$lo.user.ip

0 Likes
8 Replies
ALARMus Acclaimed Contributor.
Acclaimed Contributor.

Re: Get Requester [SM User] IP to append it in Ticket Record

Jump to solution

Is this for ESS users or for operators which work in SM ?

What client are using ?

0 Likes
Absent Member.. Shahboub Absent Member..
Absent Member..

Re: Get Requester [SM User] IP to append it in Ticket Record

Jump to solution

Hi, alarms

 

 

 

 

Thanks,
Mohamed Shahboub

ITSM Consultant
0 Likes
ALARMus Acclaimed Contributor.
Acclaimed Contributor.

Re: Get Requester [SM User] IP to append it in Ticket Record

Jump to solution

Perhaps you would rather run an external command.

ipconfig command let you take IP.

 

To run external command you can use:

system.functions.rtecall("callrad", rteReturnValue, RADApp,rteNames, rteValues, false)

For example:

Param: $L.command=a??ping;a??+nullsub(network.address in $L.file, a??0.0.0.0a??)

RAD App: us.launch.external

========================

This example opens a DOS window.

function invokeExternal() 
{
var rteReturnValue = new SCDatum();
var rteNames = new SCDatum();
var rteValues = new SCDatum();

rteNames.push("name"); 


rteValues.setType(8);

rteValues=system.functions.insert(rteValues, 0, 1, "cmd");

system.functions.rtecall("callrad", 
rteReturnValue, 
"us.launch.external", //RAD app name
rteNames, 
rteValues,
false); //false to run in same thread, true to run in new thread 

}

You can use all data from ipconfig command or parsу for IP only.

0 Likes
Audrey H. Acclaimed Contributor.
Acclaimed Contributor.

Re: Get Requester [SM User] IP to append it in Ticket Record

Jump to solution

Hi,

In Service Manager there is a RAD function sysinfo.get("ClientNetAddress").  This produces the IP address of the logged in user performing the action.  Assuming the logged in user is the requestor, you might be able to use this, but if the requestor is someone other than the logged in user this won't help you.

Audrey

0 Likes
Absent Member.. Shahboub Absent Member..
Absent Member..

Re: Get Requester [SM User] IP to append it in Ticket Record

Jump to solution

Hi, Audrey

 Of course i wanna get the logged user IP , if i want to create a  Text field in [ess.SD.open] and also i created dev.ip field in table [incidents] so where could i put  sysinfo.get("ClientNetAddress") . i am new to classic mode 😞 

 

 

 

thanks 

Shahboub

Thanks,
Mohamed Shahboub

ITSM Consultant
0 Likes
ALARMus Acclaimed Contributor.
Acclaimed Contributor.

Re: Get Requester [SM User] IP to append it in Ticket Record

Jump to solution

Use FC for "login.DEFAULT"

And set in "initialization expression" next expression:

$lo.user.ip=sysinfo.get("ClientNetAddress")

So now you can use FC for interactions in Calculation (for add)

dev.ip in $file=$lo.user.ip

0 Likes
Absent Member.. Shahboub Absent Member..
Absent Member..

Re: Get Requester [SM User] IP to append it in Ticket Record

Jump to solution

Dear Alarmus,

    Thanks For your suggested Solution it works fine 🙂

 but which rad function could i use to get Client mac address or computer name .

 

 

Thanks 

Shahboub

Thanks,
Mohamed Shahboub

ITSM Consultant
0 Likes
ALARMus Acclaimed Contributor.
Acclaimed Contributor.

Re: Get Requester [SM User] IP to append it in Ticket Record

Jump to solution

I think you can do this only through JS, for example in FC->Login.default start script and save all data from command "ipconfig" to variable. And than you can parse neede data.

 

There is only this command for client:

sysinfo.get("ClientOSName")

sysinfo.get("ClientPID")

sysinfo.get("ClientVersion")

Full list - hp_man_SM9_31_ProgrammingMgr_pdf.pdf

 

---------- 

KUDOS are Welcome

--------\/

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.