Highlighted
Regular Contributor.
Regular Contributor.
258 views

Can we put variable in a field input in HP SM?? Like for dept, Input: dept=$lo.dept

Hello Experts,

I would like to search incidents only for the incidents which are from the logged in user's dept.

I have include a field in the advance search form.  If i put the $lo.dept in that fields input. It shows the department of the user but unable to search the incidents based on that department.

Can we put input somthing like "dept=$lo.dept" in the input, so that i can search the incident on the basis of logged in user's department only?

Regards,

Sid

0 Likes
4 Replies
Highlighted
Honored Contributor.
Honored Contributor.

Re: Can we put variable in a field input in HP SM?? Like for dept, Input: dept=$lo.dept

Hello Sid

the way that you are doing it is the correct one, you just put the variable name in the input field and the field will contain the value of that variable.

for the search part, I will recommend seeing if the query that is doing is the correct one to pull what you want. you can check the query by doing a trace rtm 3 and debugdbquery 999 when hitting search, then just check the logs.

hope this guides you.

BR!

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Regular Contributor.
Regular Contributor.

Re: Can we put variable in a field input in HP SM?? Like for dept, Input: dept=$lo.dept

Hello Luis,
Thanks for your reply. In debug log query parameter shows as dept#"AGBD". I searched by "AGBD" in the dept field.
But i want to put the value automatically by loggedin user dept.
I am little confused where to put this query.
Can you explain little bit.
Regards,
Siddhartha
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Can we put variable in a field input in HP SM?? Like for dept, Input: dept=$lo.dept

Using FC login.DEFAULT in Calculations tab you can set any variable (for example calling JS or $fileX, where X is a number from Requests tab)

For example,

Calculations tab:

Add: true

Calculation: $lo.dept=dept.name in $file1

Requests tab:

File name: contacts

request: contact.name=contact.name in $file

Add: true

 

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Can we put variable in a field input in HP SM?? Like for dept, Input: dept=$lo.dept

In the advanced filter no because it considers whatever you put as text (or the respective type).. eval, evaluate won't work there.. you can achieve it using the Object Definition panel Search Configuration.
Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!
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.