4 Replies Latest reply on Nov 9, 2016 8:36 AM by Ricardo_Almeida

    Removal of a collection line - With action

    Ricardo_Almeida Specialist

      Hello Community,

       

      I am trying to come up with a way to delete/remove a line from a collection that i have created.

       

      If selecting "add purchase request line", i am prompted with a new window with 3 fields, where, once filed out and saved, appear on the bottom tab collection "Add purchase request collection".

       

      My objective would be able to detach/remove/delete the line that i have inserted, however i am having difficulties in doing so. On our "add attachment" action, if a user deletes the values of the fields he has filled out and selects save, the line disappears.

       

      If i do the same on "Add Purchase request line" action, the collection line will remain, but with no values inserted.

       

      Any ideas?

       

      Thanks in advance

       

      Ricardo Almeida

       

       

      Delete PR.pngdelete pr 2.png

        • 1. Re: Removal of a collection line - With action
          dmshimself ITSMMVPGroup

          In general you cannot delete items from a collection in WebDesk.  For your attachments, I'm guessing, but I think the item is still there. The query/filter being used to display those might have a criteria on it to not display if the attributes are empty.  If so, you could do the same trick with your other collection.  Have a checkbox called (say) deleted, which the query uses to not display items where that checkbox is set.

           

          In Console you can delete items from a collection, but that isn't going to be too much use for your general population of users.

           

          The ability to delete items more cleanly would be a very welcome addition to the product.

          • 2. Re: Removal of a collection line - With action
            Ricardo_Almeida Specialist

            Thanks dmshimself,

             

            Would it be possible to guide me on how i can add that criteria (how do i apply the criteria if i want all values from the attributes to dissapear/de-attached)?

             

            My attributes being used are:

             

            Item

            Location

            Quantity

             

            pr line 2.png

             

            Best Regards,

             

            Ricardo Almeida

            • 3. Re: Removal of a collection line - With action
              dmshimself ITSMMVPGroup

              Just like adding any other criteria really.  Let's say you only wanted to display items where the quantity was >0 i.e. setting it to 0 was your trick for making it disappear.  Add quantity >0 to the criteria should do that

              • 4. Re: Removal of a collection line - With action
                Ricardo_Almeida Specialist

                Hi dmshimself,

                 

                Thanks for the feedback. Apologies as I didnt respond yesterday but i found a way to do this (not sure if is correct but give the same result)

                 

                For each of the attributes that i have on the collection, i placed the criteria "Is not null".

                 

                If i remove the values, the line dissapears

                 

                not sure if i can use also this solution?

                 

                Best Regards,

                 

                Ricardo Almeida