cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Analytics Designer - Comment Deletion

pranavvyas01
Participant
0 Likes
1,313

Hi All,

I see in the Analytics designer there is a option to delete the comments using the context as in the below code:

Table_1.getDataSource().getComments().removeComments({@MeasureDimension: "[sap.epm:M010_10_Accounts].[parentId].&[A134000]", sap.epm:M010_10_Operating_Income_Version: "public.Actual"});

but somehow when we try to write the same code as below; the code is not validated.

Table_1.getDataSource().getComments().removeComments({version: "public.Actual"});

Can you help me resolve the issue. My requirement is to delete the comments for version members.

Thanks & Regards,

Pranav Vyas

Accepted Solutions (0)

Answers (1)

Answers (1)

avsalynin
Active Contributor

pranavvyas01

I recommend to look API scripts in the standard application "Feature - Use comment features inside applications"

Remove Comment by ID

var sel = RBG_CommentIDs.getSelectedKey();
Table_PlanningEnabled.getDataSource().getComments().removeComment(sel);
RBG_CommentIDs.removeItem(sel);
T_Comment.applyText(" ");
ScriptObject_1.getAllComment();

Remove all Comments

Table_PlanningEnabled.getDataSource().getComments().removeAllComments(GSel);
//GSel - global variable with Type - Selection
RBG_CommentIDs.removeAllItems();
T_Comment.applyText(" ");
pranavvyas01
Participant
0 Likes

avsalynin

Thanks for your response.

I have checked the standard content but the issue is remove All comments only removes the cell comments but not all the comments from the table. My requirement is to remove all the comments that are available in the table.

Thanks & Regards,

Pranav Vyas

avsalynin
Active Contributor
0 Likes
pranavvyas01

as i know, with Table_1.getDataSource().getComments().removeAllComments() we can remove only comments in table cell.

delete comments to elements (upper right corner) - it seems that you can only do it manually.

pranavvyas01
Participant
0 Likes

Hi Aleksey,

Yes correct and if there are too many comments in single table then it makes it difficult to remove each of them manually. It is similar to deleting the comments manually.

Thanks & Regards,

Pranav Vyas

abeera11
Explorer
0 Likes
Hi! Can you please share the full code of how you did it? how to delete all comments (data point comments) in a table