Tree

  

Good Afternoon!

How to make a tree similar to what is in the image?

Hi Christian,

There are multiple forge components to achieve something like this, including:

http://www.outsystems.com/forge/component/537/jstree/ and http://www.outsystems.com/forge/component/31/tree-widget/

being the most popular.

Let me know if this helps,

Justin

Hi Christian,

   you can download the zTree from forge too. I used it and I got some good results.

http://www.outsystems.com/forge/component/963/ztree/



Luck

I did something similar without downloading a component. You would need a field on the Entity that points to itself (in my case, this was OrganizationId and ParentOrganizationId). 

Then, on the Table itself there's an expression that holds the description, and a style that defines the indentation (in my case, it's "margin-left:" + (TreeView.Level-1) + "0px")


SyntaxEditor Code Snippet

SELECT {Team}.[Id], {Team}.[Description], {Team}.[OrganizationId], {Team}.[ParentOrganizationId], LEVEL
FROM {Team}
START WITH {Team}.[OrganizationId] = 1 
CONNECT BY PRIOR {Team}.[OrganizationId] =  {Team}.[ParentOrganizationId]

Luciano Schiavo wrote:

Hi Christian,

   you can download the zTree from forge too. I used it and I got some good results.

http://www.outsystems.com/forge/component/963/ztree/



Luck

Hi Luciano,

I can't use the widget. I did as the example but nothing is displayed.
Can you help me?

Thanks


I get the data in JSON format and I have to make the tree as the image.

Hi Christian,

    there are samples how to use zTree and you can work using JSON. This forge element has all examples available on internet.   See these samples in the url below to check if they fit to you 

http://www.treejs.cn/v3/demo.php#_101

Luck