Honored Contributor.. Anthony Dalferr Honored Contributor..
Honored Contributor..
143 views

Customer views based on data from the assignment table

Jump to solution

I have a requirement to create views based on data fields in the assignment table we have created.  The new field is called wdDirector and wdVP.  We need to have views created that show those who are identified as wdDirector and wdVP.  The data in these fields is their operator logons.  The view creation is the simple part.  The problem I am having is finding a way to identify the logged on user as being the director or VP of those assignment groups.  I thought I could replicate the funcitonality of the $lo.pm.assignments variable but I cannot seem to figure out the logic on how that is built.  I tried doing it in format control on the login.defualt by using the query table and performing calculations based on matching the logon but I only return one request.  I also tried creating a global list where I was using wddirector=$lo.user.name but this only returned values when I rebuilt the global list and then it was only for my admin ID.  It would not refresh on each new logon.  We are currently running on SM9.30.

0 Likes
1 Solution

Accepted Solutions
TomPowe Acclaimed Contributor.
Acclaimed Contributor.

Re: Customer views based on data from the assignment table

Jump to solution

I reviewed that code and I don't see any missing brackets:

$L.void=rtecall("rinit", $L.rc.code, $L.assignment.rec, "assignment");$L.void=rtecall("select", $L.rc.code, $L.assignment.rec, "wdDirector=operator()"); $G.array={};$L.next.record.code=0;$L.array.pos=1;while ($L.next.record.code=0) do ($L.array.pos in $G.array=name in $L.assignment.rec;$L.array.pos=$L.array.pos+1;$L.void=rtecall("next", $L.next.record.code, $L.assignment.rec))

7 Replies
Highlighted
Jhonny_C_SM Frequent Contributor.
Frequent Contributor.

Re: Customer views based on data from the assignment table

Jump to solution

Greetings.

As I understand you requirement, the following link regarding a thread may be helpful:

http://community.hpe.com/t5/HPE-Service-Manager-Service/View-Restriction-based-on-operator/m-p/6443634#M109334

It is mentioned that you can restrict the view in the audience tab of the view, you can access to it in db > table: inbox > search for the view > you will see the Audience tab.

I hope this works for you.

Regards,

Jhonny Castro Montero
SW Support Technical Consultant
San Jose, Costa Rica
hpe.com
Hewlett Packard Enterprise

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
Honored Contributor.. Anthony Dalferr Honored Contributor..
Honored Contributor..

Re: Customer views based on data from the assignment table

Jump to solution

This is not what I am looking for.  I am looking for a way to indentify a person as being the director of a group.  I don't have a problem restricting a view.  I have a problem generating the list that a certain user is the director of.  Simliar to how $lo.pm.assignments is built.

0 Likes
TomPowe Acclaimed Contributor.
Acclaimed Contributor.

Re: Customer views based on data from the assignment table

Jump to solution

Anthony,

You need to do something like this in calculations.  You don't need the query in FC:

$L.void=rtecall("rinit", $L.rc.code, $L.assignment.rec, "assignment");$L.void=rtecall("select", $L.rc.code, $L.assignment.rec, "wdDirector=operator()"); $G.array={};$L.next.record.code=0;$L.array.pos=1;while ($L.next.record.code=0) do ($L.array.pos in $G.array=name in $L.assignment.rec;$L.array.pos=$L.array.pos+1;$L.void=rtecall("next", $L.next.record.code, $L.assignment.rec))

Then $G..array should contain the assignment group names....

 

Honored Contributor.. Anthony Dalferr Honored Contributor..
Honored Contributor..

Re: Customer views based on data from the assignment table

Jump to solution

I don't have access to try this out right now but that looks like it will work, except for the last part. 

You have listed

$G.Array={

with nothing after it. 

0 Likes
TomPowe Acclaimed Contributor.
Acclaimed Contributor.

Re: Customer views based on data from the assignment table

Jump to solution

I reviewed that code and I don't see any missing brackets:

$L.void=rtecall("rinit", $L.rc.code, $L.assignment.rec, "assignment");$L.void=rtecall("select", $L.rc.code, $L.assignment.rec, "wdDirector=operator()"); $G.array={};$L.next.record.code=0;$L.array.pos=1;while ($L.next.record.code=0) do ($L.array.pos in $G.array=name in $L.assignment.rec;$L.array.pos=$L.array.pos+1;$L.void=rtecall("next", $L.next.record.code, $L.assignment.rec))

Honored Contributor.. Anthony Dalferr Honored Contributor..
Honored Contributor..

Re: Customer views based on data from the assignment table

Jump to solution

I see it now.  It seems IE did not know how to render all of that code.  I will give this a try.

0 Likes
Honored Contributor.. Anthony Dalferr Honored Contributor..
Honored Contributor..

Re: Customer views based on data from the assignment table

Jump to solution

This worked perfectly.  Thank you.

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.