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

  • 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!

  • 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
  • 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

     

  • 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.