cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Windchill RV&S Project Visibility when Running a Report

MS_9990422
6-Contributor

Windchill RV&S Project Visibility when Running a Report

I am trying to create a custom report based on a single document selection which shall display the following information:

The report shall create a Table, where:

  • each row is a content node of the selected document segment
  • each column is a RV&S project
  • each cell displays the ID of the branched content node within the project (column) for the current content node (row)

The table shall look like this:

NoContent Node IDProject #1Project #2... all Projects
#1123

456

(Content node ID of Branched Item for 123 in Project #1)

  
#2234

 

789

(Content node ID of Branched Item for 234 in Project #2)

 

...... all content IDs   

 

My Report Recipe looks as follows:

 

 

<%begindetail%>
  <!-- All Projects -->
  <%beginrelationshipsdetail Query[(field[Type]="Project")]%>
    <script>
      project = "<%Relationship Project%>".trim();
      if (project.startsWith(projectPrefix) && project != (projectPrefix + "Garbage"))
        projects.push(project);
    </script>
    <p><%Relationship Project%></p>
  <%endrelationshipsdetail%>

  <!-- All nodes of a document -->
  <%beginrelationshipsdetail Query[(walkdocordered[<%<%builtin ID%>%>]recurseinclude)]%>
    <p><%Relationship ID%></p>
    <script>
      n = new node(<%Relationship ID%>);
      nodes.push(n);
    </script>
    <%beginrelationshipsdetailL2 <<<BRANCHES>>>%>
      <span><%RelationshipL2 ID%>; </span>
      <script>
        if (!n.branches["<%RelationshipL2 Project%>"]) {
          n.branches["<%RelationshipL2 Project%>"] = [];
        }
        n.branches["<%RelationshipL2 Project%>"].push(<%RelationshipL2 ID%>);
      </script>
    <%endrelationshipsdetailL2%>
  <%endrelationshipsdetail%>
<%enddetail%>

 

 

My code works perfectly fine as long as the executing user has access to all projects, otherwise the user gets the error message: "MKS124814: Cannot show view information: MKS124283: Permission Denied: Item XXX is not visible due to project/type visibility restrictions" for branched content nodes. This is common because items are branched into projects where the current user might not have access to. This error also comes up if an Item within the document was branched from another item where the user has no permission to view the branched item. Although I have no idea why the system would need to walk this item...

 

Is there one of the following ways to handle this?

  • Can I handle Windchill RV&S errors within the Report Recipe via JS or Java?
  • Can I rewrite the walk-Query to only include items of projects where the item is visible?
  • Any other ideas?

 

 

0 REPLIES 0
Announcements


Top Tags