How to fetch table data when using custom widget

Hello All,

We are exploring custom widget and we are trying to create responsive table display using custom widget. Ex. Table with frozen header shown in the image below.

We can display static table data but can we pull the data from tulip table and display it in html? Is there a way if we can achieve this is tulip?

Hi @harikiran.bm,

yes of course. You can request them via api and load them into a data table using jquery.

Keep in mind, loading too much data can take a bit time and if you want to load a extremly large amount data this won’t work :smiley:

2 Likes

@tokotu is right on with that suggestion! That is probably the best way to currently do this.

Potentially you could also pass in some table data as a prop (disclaimer, I’ve not tried this, and it might be a rough trigger to put together).

We’ve had some requests for direct access to Tables in Custom Widgets, and it’s one of the things the Tulip Team wants to work on, but it’s not scheduled yet, so no timeline there.

Instead of direct access (Although I don’t know what Direct Access means, JSON is already the most direct data connection? :slight_smile: ) it would super great if we could upload externally libraries to our tulip instance to improve performance. The current ones do not reflect the desired functions AND last but not least it would be cool store js functions on cloud increasing transparency with AMD Modules :wink: Yes, this was a unofficial feature request :smiley:

1 Like

Thank you for your suggestion. This worked for us using jQuery.

How can we use each of this loaded record in html to make a dynamic display of data?

Example- instead of column one and column two I need to pass these loaded data.

Direct access to tulip table here in the sense we get list of table names in custom widget and when we choose table it also loads data or some sort of table aggregations or query which we can use in custom widget? These would be a game changer if it’s brought in custom widget if there’s no data limitation. We’re looking on a long-term perspective so even if it’s in the road map it would be still great.

Quick Tipp : If you already using Jquery, you have to use Jquery Datatables too, that’s a real game changer for you :wink:

What’s in Datatables?, good question :wink: for example :

  • Fulltext search
  • Paging
  • Translation
  • Row callback (Which row was selected)

And so much more…

2 Likes

Direct access : Mhm think you could develop this own you own in custom widget… getting all tulip tables, make them chooseable in embedded dropdown and request required data and data format for this displaying in datatable…

Thank you!! We’ll try on this.

You can dm me if you need support for poc.

2 Likes