9 Replies Latest reply on Sep 7, 2016 5:50 PM by aanjan RSS
    pbaierl Creator

    Organization Display Questions

    Is there a way to display the Organization trees as shown (like below example) in a mashup?

     

     

    I also need to be able to view users/members and assets based on the organization hierarchy.

    People in the root unit/organizational group (ThingsOrganization) would be able to view the entire organization, users and assets.

    People in New Unit 3 would only be able to see New Unit 4 and New Unit 6 as well as the assets and users assigned to New Unit 4 and New Unit 6.

     

    Any advice/information on how I could approach this would be extremely helpful.

     

    Thanks,

     

    Paul

      • Re: Organization Display Questions
        carlesc Ninja

        Hi Paul,

         

        About Tree visualization --> no there isn't this kind of widget, the two available options to render a tree:

        To recover Organization hierarchy, you should use service: GetOrganizationConnections

         

        About viewing users on each Organization node, you should leverage Organization service:

         

        • GetMembers(name) --> Get Organizational Unit (name) user members

         

        About viewing assets with a given Organizational Unit visibility... That will be really hard. You should iterate over all your platform Things/ThingShapes/ThingTemplates/Networks/... everything, and call GetVisibilityPermissions, and then check if this Organizational Unit it's there, a really time consuming task.

        • Re: Organization Display Questions
          pbaierl Creator

          Carles,

           

          Where can I find the GetOrganizationConnections service?

           

          I have been looking but didn't see it.  I see the OrganizationConnections entity, but I haven't been able to find a service to return the organization connections.

           

          Thanks for your help

           

          Paul

            • Re: Organization Display Questions
              aanjan Heavyweight Champ

              Paul, that is a service on your Organization entity itself. For example, add a new service and choose your Organization entity in the Entities tab. GetOrganizationConnections is a service available under the OrgUnits category.


              org.JPG

                • Re: Organization Display Questions
                  pbaierl Creator

                  Aanjan,

                   

                  Thanks for the quick response.  I found the service as you said.  I can test the service and it seems to work correctly when using the test button. 

                   

                  However, I cannot get any data to show up in my mashup.  I can see that my service returns X number of rows using the trace window, but nothing is displayed in my tree widget or my grid.

                   

                  Any thoughts as to why my service isn't updating the grid or tree?  My service returns an info table and takes in nothing.

                   

                  Thanks,

                   

                  Paul

                    • Re: Organization Display Questions
                      aanjan Heavyweight Champ

                      Can you try selecting/ checking 'ShowAllColumns' box in your Grid's properties window?

                        • Re: Organization Display Questions
                          pbaierl Creator

                          Yes, and this had no effect.  I checked the logger and did a trace.  Neither show an issue.  The trace shows that 15 rows were returned when nothing is displayed in the grid.

                           

                          I am using an administrator login, verified I enabled permissions for visibility, and permissions to execute the service.

                           

                          Is it possible I am not returning the proper format?  My service just returns an info table with the results. 

                            • Re: Organization Display Questions
                              aanjan Heavyweight Champ

                              I tried this on my local instance, and it worked fine. Mine is pretty much getting that service in -

                               

                              var params = {

                                  maxDepth: undefined /* NUMBER */

                              };

                               

                              // result: INFOTABLE dataShape: OrganizationConnection

                              var result = Organizations["Everyone"].GetOrganizationConnections(params);

                               

                              and setting the output to Infotable. Now, if you hit test, it should bring back an Infotable with populated rows. Binding this service to the Grid with 'ShowAllColumns' checked should display all data in your Mashup.