AnsweredAssumed Answered

Need a Script to add data to muliple records via a relationship

Question asked by xxx202xxx on Dec 7, 2017
Latest reply on Dec 8, 2017 by BeatriceBeaubien

Relationship

ServiceMGMT::TicketID = NoteMGMT::TicketID_fk (a ticket can have multiple Notes and a note belongs to one ticket)

 

Situation: I have a list layout for my employees that filters tickets that are assigned to them.  Through this relationship an employee can choose a ticket, click a button that pops up a window for them to add a New Note (NoteMGMT::noteID and a NoteMGMT::notes).  Today I was asked if a note for multiple tickets (same note) could created.  I thought about it and said yes, so I began the process.

 

What I have thus far: I created a ServiceMGMT::Select field that was set up as a checkbox with a value of 1 in the body of my list layout that falls next to each Ticket.  I know I can write a script to loop through a found set.

 

                If [Get ( FoundCount ) > 0

                    Loop

                         Goto to Layout ["Note_Popup (NoteMGMT)]

                         New Record/Request

                         Goto Field [NoteMGMT::notes]

                         Pause/Resume Script

                         Go to Record/Request/Page [Next; Exit after last]

                    End Loop

               End If

 

My Issues: (Issue 1) I'm getting stuck on how to create a found set based on the tickets that are checked. (Issue 2) I would also like for a Note popup to allow the users to enter the note of their choice that will then be added as New notes for the tickets that were checked.  (Issue 3) I would want the user to enter this note 1 time for all the tickets in the found set.

Outcomes