Skip to main content
1-Visitor
August 31, 2016
Solved

Organization Display Questions

  • August 31, 2016
  • 2 replies
  • 4543 views

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

    Best answer by Aanjan

    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.

    2 replies

    1-Visitor
    September 1, 2016

    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.

    pbaierl1-VisitorAuthor
    1-Visitor
    September 6, 2016

    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

    5-Regular Member
    September 6, 2016

    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

    pbaierl1-VisitorAuthor
    1-Visitor
    September 6, 2016

    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