Symptom
- Table_1.getDataSource().getComments().addComment/Comments();
- Hard line breaks are not copied when adding comments via scripts, but copied as soft line breaks.
- Hard line break: Press [Enter] key.
- Soft line break: Press [Shift+Enter] key.
- When manually copying a comment that has a hard line break applied in comment editor, the hard line break is maintained.
Environment
SAP Analytics Cloud
Reproducing the Issue
- Apply addComment() scripts in Button.onClick.
- Check the comment to be copied: "we [hard line break] are".
- Click on Button to run addComment() scripts, where copied the same text to the comment thread.
- Double click on comment cell, and notice the copied text displays as "we [soft line break] are", instead of "we [hard line break] are".
Cause
The hard line break is actually rich text with mark language like "<p>we</p>\n<p>are</p>".
Commenting API currently do not support Rich Text as input, only plain text is supported.
Resolution
This is the designed behavior for commenting API.
See Also
- 2569847 - Where can you find SAC user assistance (help) to use, configure, and operate it more effectively?
- Have a question? Ask it here and let our amazing SAP community help! Or reply and share your knowledge!
- 2487011 - What information do I need to provide when opening a case for SAP Analytics Cloud?
- Search for SAP Analytics Cloud content using Google or Bing:
- https://www.google.ca/search?q=site%3Ahttps%3A%2F%2Fapps.support.sap.com+SAP+Analytics+Cloud
- https://www.bing.com/search?q=site%3Ahttps%3A%2F%2Fapps.support.sap.com+SAP+Analytics+Cloud
- Note: Add relevant text or warning/error messages to the text search field to filter results.
- SAP Analytics Cloud > Learning > Data Connections
- SAP Analytics Cloud > Learning > Guided Playlists
- SAP Analytics Cloud > Learning > Guided Playlists > Getting Support
- Need More Help? Contact Support or visit the solution finder today!
Your feedback is important to help us improve our knowledge base.
Keywords
hard line break, soft line break, comments, script, sap analytics cloud, unified story scripting, table_1.getdatasource().getcomments(), rich text, plain text, unexpected behavior, copying comments, line breaks, paste, transfer , KBA , LOD-ANA-UNS-SCR , Unified Story Scripting related Issues , Problem