We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Adding diagrams with dynamic data and attributes by hastag from database or API

Hi everybody,

I have one question. I will need your documenteditor to create complex documents with the possibility to add functions for adding hashtags to get data from a database.
So as example if I click a button in the toolbar, a dialog is opening or by hashtag and I can choose as example "Give me number of existing companys in the world" (title from database), it will be interpreting, I don't know maybe 4 billion per API from database and will include it in the content of the documenteditor. If I update this value in the database it has to be changed in the documenteditor, too.

Do you maybe has a functionality for this special case or can I develop easy an own one?

The same we will need for diagrams in the documenteditor. Maybe it's an existing function or a feature request.

Best regards and thank you,
Chris

1 Reply

HC Harini Chellappa Syncfusion Team December 11, 2019 01:33 PM UTC

Hi Chris, 

Thank you for contacting Syncfusion support. 

I will need your documenteditor to create complex documents with the possibility to add functions for adding hashtags to get data from a database. 
For inserting data in document editor, it must be inserted as any of the following 
1.       Text. 
2.       Fields. 

So as example if I click a button in the toolbar, a dialog is opening or by hashtag and I can choose as example "Give me number of existing companys in the world" (title from database), it will be interpreting, I don't know maybe 4 billion per API from database and will include it in the content of the documenteditor. 
Document editor provides mail merge support with the help of DOCIO. 

Please refer the docio documentation on mail merge 

To perform mail merge in DocumentEditor, we don’t have built-in mail merge functionality. You can perform Mail-merge in server side by using Syncfusion.DocIO library.   


Document editor provides option to insert fields. you can insert the fields in document editor and with the help of DOCIO, you can execute the fields with data in server side and then open the updated document in document editor. 


Insert fields in document editor using insertField method in editor module.    
    
this.container.documentEditor.editor.insertField('MERGEFIELD '+text+' \\* MERGEFORMAT', '{{'+text+'}}');   
    
First parameter refers field code and second parameter refers display text.   
    
Please refer the below KB documentation on how to perform mail merge in document editor. 



If I update this value in the database it has to be changed in the documenteditor, too. 

There is no 2-way binding. Once mail merge executed for a document, fields are replaced with data which is maintained in server side. You cannot re-execute the same document, since it doesn’t contain fields. 

You can dynamically add new fields in document editor for the document and execute it with docio. 

The same we will need for diagrams in the documenteditor. Maybe it's an existing function or a feature request 
Inserting diagrams or shapes in document editor is currently not supported.  

We have logged the feature request for this feature.
   
This feature is expected to available in our 2020 Volume 1 release at end of March 2020. We will update you once the feature implemented.   
    
Now, you can track the status of this feature through below feedback link.   
    
    


Note: Inserting text in field alone is currently possible in document editor. 

Regards, 
Harini C 


Loader.
Live Chat Icon For mobile
Up arrow icon