Skip to Content
0

Copy and clear Comments in one

Mar 07 at 05:44 PM

68

avatar image
Former Member

Hello,

I want to do the Copy Comments and Clear Comments in one Package . User wants to have a button in the Excel to Copy comments(From Selection and To Selection) and then it should also clear the FROM Selection. I tried creating a custom package and copied both the standard COPY and CLEAR DM scripts . This will not work because I am locking the record and it won't do both the task at the same time.

Any suggestions?.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

8 Answers

Vadim Kalinin Mar 07 at 06:05 PM
0

"I tried creating a custom package and copied both the standard COPY and CLEAR DM scripts" - please explain what you have done!

What do you mean by "custom package"?

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 07 at 06:32 PM
0

Thanks Vadim.

I copied both the DM scripts of COPY and CLEAR comments and created a new custom Package with the script below :

PROMPT(COPYMOVEINPUT,%SELECTION%,%TOSELECTION%,"Select the members to COPY and where to",%DIMS%) PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when copy comments.",1,{"Yes, check work status settings when copy comments","No, do not check work status settings"},{"1","0"}) 'PROMPT(DELIMITER,%SELECTION%,) TASK(/CPMB/COPY_COMMENTS,SELECTION,%SELECTION%) TASK(/CPMB/COPY_COMMENTS,TOSELECTION,%TOSELECTION%) TASK(/CPMB/COPY_COMMENTS,CHECKLCK,%CHECKLCK%)

PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when deleting comments.",1,{"Yes, delete comments with work status settings","No, do not delete comments with work status settings"},{"1","0"}) TASK(/CPMB/CLEAR_COMMENTS,SELECTION,%SELECTION%) TASK(/CPMB/CLEAR_COMMENTS,ENABLETASK,%ENABLETASK%) TASK(/CPMB/CLEAR_COMMENTS,CHECKLCK,%CHECKLCK%)

Thanks.

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Please post text with correct line breaks! Impossible to read.

0
0

P.S. And what is the chain for this package?

0
Former Member

PROMPT(COPYMOVEINPUT,%SELECTION%,%TOSELECTION%,"Select the members to COPY and where to",%DIMS%)
PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when copy comments.",1,{"Yes, check work status settings when copy comments","No, do not check work status settings"},{"1","0"})
TASK(/CPMB/COPY_COMMENTS,SELECTION,%SELECTION%)
TASK(/CPMB/COPY_COMMENTS,TOSELECTION,%TOSELECTION%)
TASK(/CPMB/COPY_COMMENTS,CHECKLCK,%CHECKLCK%)

PROMPT(RADIOBUTTON,%ENABLETASK%,"Do you want to clear comments associated with data regions?",1,{"Yes","No"},{"1","0"})
PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when deleting comments.",1,{"Yes, delete comments with work status settings","No, do not delete comments with work status settings"},{"1","0"})
TASK(/CPMB/CLEAR_COMMENTS,SELECTION,%SELECTION%)
TASK(/CPMB/CLEAR_COMMENTS,ENABLETASK,%ENABLETASK%)
TASK(/CPMB/CLEAR_COMMENTS,CHECKLCK,%CHECKLCK%)







0
avatar image
Former Member Mar 07 at 09:40 PM
0

Chain for this is COPY Comments as I created the custom DM by copying the COPY Comments package . After that I added the Clear Comments Task . Let me know if I am able to explain what I am trying to do.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

And how clear comments tasks are related to this chain?

0
avatar image
Former Member Mar 07 at 11:05 PM
0

One option I think is to copy the standard Process chain /CPMB/COPYCOMMENTS and create a custom chain . Then add the steps of Clear Comments Process chain(/CPMB/CLEARCOMMENTS) to the custom Chain . Let me know if there is any other better solution?.

Share
10 |10000 characters needed characters left characters exceeded
Vadim Kalinin Mar 08 at 06:44 AM
0

Try to create a custom chain.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Vadim,

Can I use any BADI to achieve this functionality .

0

Have you created a custom chain?

0
avatar image
Former Member Mar 08 at 06:52 PM
0

I am trying that Approach . One question regarding that how can I commit the Copy comments first and then run clear comments step in the PC. Because both cannot be triggered at the same time.

Show 6 Share
10 |10000 characters needed characters left characters exceeded

Please show the screenshot of the custom chain.

0
Former Member

Below is screenshot:

capture.png (5.8 kB)
0

Incorrect chain.

First copy copy comments chain then add clear comment step.

0
Former Member

Still not sure ,something like this

capture1.png (18.3 kB)
0

Incorrect!

Insert Clear step immediately after copy step.

0
Former Member

Changed it to

capture.png (11.7 kB)
0
avatar image
Former Member Mar 08 at 09:59 PM
0

When I run the Package attached to the Custom Process Chain . I get the error Below:

Package Script:


capture.png (27.7 kB)
capture1.png (28.5 kB)
capture2.png (41.9 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 09 at 01:28 AM
0

Thanks Vadim , it works now.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Please accept the correct answer: "Try to create a custom chain"

0