Skip to main content

 

My extension editor has defined a data source which contains multiple collections of data items.

I have an Data Connector Action defined that gets triggered when a user hits a button in the extension editor.

I know in the extension editor project, I have access to a DataProxy, which has access to DataSources and CollectionProxy, etc. Through the DataProxy, I am able to access all the custom data found in the document correct?

Assuming that is true, in a Data Connector project, such as in an action: DataConnectorAsynchronousAction, is it similarly possible to access all the custom data found in the document?  If so, how?  I am not seeing how I can access the DataProxy within DataConnectorAsynchronousAction.

 

Thanks,

Dan

 

Hi ​@quodsimDan , thank you for your question. Someone from our team will reach out shortly help.


Hello Dan,

 

The proxy classes (such as DataProxy) are only useful in an editor extension, as that is where you establish the client that connects to the LucidDocument. The purpose of a data connector is to simply translate and store data from the editor extension over to Lucid. With that said, I’m curious what your use case is for needing all of the data in a data connector action. Could you instead look at all of the data in the editor extension, and then send over only the required data to the data connector action?


Technically speaking, in my current design, my app specific data is not in a database and lives primarily within LucidChart.  When the user hits a button in the editor extension’s React App, it calls a Data Connector action.  In the action, my intent was to consolidate the data source collection data into a custom json and send that to an endpoint.

What you are suggesting is to move the web api json payload creation to the extension editor and pass to the action, correct?


If your data only lives within Lucidchart, then it might be the case that a data connector is not needed. A data connector is only really needed if you intend to reference an outside data source that Lucid does not inherently support. If the goal of your extension is to simply gather data from a Lucid document, and then send that to an endpoint, I believe you could do all that within an Editor Extension. If you want to sync that data back and forth from lucid to the endpoint, then that would be when you would implement a data connector.

 

So in this case, could you move the web api json payload to the editor extension, reference the DataProxy that you need to reference, and then send out the data to the endpoint via EditorClient.oauthXhr?


Reply