1 2 Previous Next 24 Replies Latest reply on Nov 19, 2013 5:11 PM by Brian.Dailey

    Attachments from one collection to another

    Jamie Cannon ITSMMVPGroup

      Alright community, I'm coming to you again.

       

      Has anyone done something like this?

       

      I need to pull an attachment from one collection to another collection using workflow.  Here is my scenario:

       

      Manager A approves a change request and on the approval window includes his updated  implementation details (as an attachment on that form).  I need that attachment to also populate into a collection called "Implementation Documents" which holds all the documents required for that Change request. This is to make it show in one spot so that the Requestor can review that document within needing access to the Approval collection which may contain notes from the approver.

       

      is this even possible using workflow or calculations?

        • 1. Re: Attachments from one collection to another
          ITSMMVPGroup

          Whenever I've tried to copy attachments I've hit the 'not supported' issue.  For example value types, event manager all fail to support attachments.  I suspect this just isn't going to work without a trigger.

          • 2. Re: Attachments from one collection to another
            Jamie Cannon ITSMMVPGroup

            thats my fear.  going to have to think of an alternative then if this isn't a possible option.  I'll think on it over dinner.

            • 3. Re: Attachments from one collection to another
              ITSMMVPGroup

              I want to be wrong in a good way :-)

              • 4. Re: Attachments from one collection to another
                ITSMMVPGroup

                Hi Jaimie,

                 

                This is one area where SD is lacking, having to replicate data (especially attachments) from one area to another.  I ran into the same thing when people here wanted to add attachments to Tasks.  Sure, there is a guide for adding Task attachments.. the only problem is, now you have attachments on the Task separate from those listed on the IPC.

                 

                What I did to get around this was create a NEW attachment business object and link it to both the IPC and its associated Task as collections. Then, I set a copy rule for the new attachment object to copy {Task/Incident} onto {Incident} with Overwrite set to FALSE.  That way, any attachments I add to a Task automatically show up for the Incident as well, but only ones added to the Task itself show up in the Task.

                 

                Maybe you could try to adjust this scheme to your current predicament.

                 

                 

                -Brian

                • 5. Re: Attachments from one collection to another
                  Jamie Cannon ITSMMVPGroup

                  Hmmm.  I will give this a shot.


                  Thanks!

                  • 6. Re: Attachments from one collection to another
                    Jamie Cannon ITSMMVPGroup

                    Could you send me a snap of how you configured that new attachment object?

                     

                    I believe I have the structure set up like you do now...

                     

                         I have an "Approvals" collection that has an attachment attribute on there.

                         I have a "Functional Specs" collectoin that has an attachment attribute on it.

                     

                    Since I want the attachment from Approvals to go to the Specs, I need to make a relationship from Approvals on to Specs.  Then set up a business object copy rule to pull that attachment from Approvals to Specs?

                     

                    Will this do it for ALL of them or can I set it to do it just one time (since that's all it'll happen).

                    • 7. Re: Attachments from one collection to another
                      ITSMMVPGroup

                      Hi Jaime,

                       

                      Your setup isn't quite the same as mine... I was dealing with two processes (an IPC and its Task) by placing a collection of the same Attachment business object on both, and copying references to the IPC from the Attachments on Tasks.

                       

                      Your setup has two collections of different b.o.'s, each with an Attachment attribute, all linked to one process... which is still doable I think.

                       

                      Try this (I'm typing in the attributes, so may not match exaclty what you see):

                      • Create a copy rule for your Functional Spec object:
                        • Select the Create Event
                        • Select source {Change/Approval/Attachment}
                        • Select target {Attachment}
                        • Select "Do not overwrite"
                      • In your process, add an automatic action "Add Functional Spec" following your "Add Approval" manual action.
                        • AddApproval_ex1.png
                        • Use the auto instance window data to copy over any other values you want (e.g., "Title")
                        • Let the copy rule handle the Attachment, it should be grabbing the latest one.

                       

                       

                       

                      See if that works for you.

                       

                      -Brian

                      • 8. Re: Attachments from one collection to another
                        Jamie Cannon ITSMMVPGroup

                        Hmmmm.  That makes sense.  I will try that for sure.  I was on the right track with that auto action and was trying a runtime value (which obviously doesn't work) but I didn't try the copy rule from one attachment field to another.

                         

                        I'll keep you posted.

                        • 9. Re: Attachments from one collection to another
                          Jamie Cannon ITSMMVPGroup

                          This worked Great!  I pulled the copy of the attachment into the specs docs collection with no problem.  This was a great help!

                          • 10. Re: Attachments from one collection to another
                            jdonneau Apprentice

                            This is really good news! However i don't get it working on my 7.5 SP1 system... did you do it in 7.6+ ?

                             

                            When i try the copy rule in 7.5 SP1 i get a type conversion error although i am copying from attachment field to attachment field...

                             

                            Unbenannt.png

                            • 11. Re: Attachments from one collection to another
                              sandeepbratch Apprentice

                              I get exactly the same in 7.5.  I'm trying to copy an attachment attribute from the incident object to a collection on the same object.

                               

                              I think this only works when copying from one collection to another.

                              • 12. Re: Attachments from one collection to another
                                ITSMMVPGroup

                                I've set this up only in 7.5 SP1.

                                 

                                @sandeep... if I get a chance, I'll try to setup and test like you have it (from Incident-->collection).  But I don't know how soon that will be.

                                 

                                 

                                -Brian

                                • 13. Re: Attachments from one collection to another
                                  jdonneau Apprentice

                                  Hi Brian, thanks for your reply.

                                   

                                  Just to clarify: did your copy rule copy the actual "Attachment" attribute to another Attachment attribute (on a different BO) or did it copy the "Collection" containing the Attachment attribute into field where this Collection BO is linked to the other BO?

                                   

                                  Also, did you test this in Webaccess or Console?

                                   

                                  I guess i will try to set it up the way you did... i was testing copy of Incident.Attachment to Collection.Attachment so little bit different from your scenario.

                                   

                                  Thanks

                                  Jörn

                                  • 14. Re: Attachments from one collection to another
                                    ITSMMVPGroup

                                    So here's a simple Request I've setup to test the process, just to verify... there's nothing else in it, and this generates my Process Attachments based on the regular Attachments succesfully.

                                     

                                    ex_TestingProcessAttachments.png

                                     

                                    And here are the copy rules I have setup for it.  I've shown the rule for the Document itself, the others are the same except for the actual attribute name:

                                     

                                    ex_TPA_CopyRules.png

                                     

                                    Additionally, I specified a title by Value Type in the "Add Process Attachments" autoaction, only because I was dumb enough to make it mandatory when I setup the object and didn't feel like changing it. 

                                     

                                    ex_TPA_AddProcessAttachment.png

                                     

                                     

                                    Hopefully that helps.

                                     

                                    -Brian

                                    1 2 Previous Next