Inquiry on using nodejs datatable SDK

Dear Team,

I am having issue using nodejs sdk accessing data table. In my case get data table worked just fine but I had trouble extracting information from data table, I tried to use get filestream & download but none of them worked. I attached the error log for your reference.

Would you mind to help me? I just want to access the table data using sdk so I could build a ticket system. In my mind user should submit a new request from catalytic web form, but there is also a nicely formatted data list having all tickets presented where user could filter, edit, save view, etc.

I thought I could get data using "get a data table" function but I only got column names metadata. should I do this with "get a filestream from data table" function or I should go with the instance sdk?

Tagged:

Best Answer

  • Ben_132821
    Ben_132821 Posts: 4
    Answer ✓

    Hi,

    Thank for your sharing the debug info. The table ID provided is a workflow ID. It should be possible to download the master table associated with that workflow, just as you can from the Catalytic Web UI. I will look into why that didn't work and get back to you here. Have you tried updated to the latest version of the SDK? I see that you are using 1.0.3 and the latest version is 1.1.2.

    As you mention, you can also use the instances SDK to get all instances of your workflow. The docs have an example here: https://developers.catalytic.com/docs/find-instances-node#example. For each instance you get back, the fields property will contain an array of the values collected in your webform. This will allow you to get just the records you want, so it may be a better approach than downloading a table export of the workflow. Please give that a try and let me know if that meets your needs.

    The next major SDK release, version 2.0 replaces the find() methods with more flexible search() methods that will allow you to search by date range, for example. That would allow your ticket system to fetch only new requests since the last fetch was completed. I expect that to be released by April 1st, but if we can't meet your needs with the current version, I can get you early access to the 2.0 REST SDK which will allow you to use the new search functionality.

    Regards,

    • Ben Blair ben@catalytic.com

Answers

  • Thank you Ben. I upgraded to nodejs SDK 1.1.2 but it is still showing the error.

    I had some thought about using instances sdk to build the ticket system. For my case the problem is I am not able to get the state of each ticket only by querying the new ticket instances. For example if someone rejected the ticket on web application the state of the ticket would change and I expect to send a web form to the requestor through catalytic, this rejection workflow might be different from the initial workflow which I used to create new ticket. So instead of just querying one instance I have to link two instances together with certain unique identifier. It would be a bit slow for user to get their requests.

    It would be really helpful if developer has REST row level control for catalytic data table. Like you said developer might be only interested on certain date range or query/update records based on id.

    I am really looking forward to SDK version 2.0, I don't mind to wait till Apr but if you could give me early access it would be much appreciated. Thank you.

  • Sean_510793
    Sean_510793 Posts: 69 admin

    Hi Li, have you considered creating a [webhook trigger](https://help.catalytic.com/docs/webhook-trigger/) based workflow that will work with a data table? That would allow you to "roll your own" API. It does have it's own set of limitations of course but has been a good tool for developers.