New function to remove an item from a list / array.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MatLudlam
    Senior Member
    • Aug 2016
    • 288

    New function to remove an item from a list / array.

    To add something to an array we have the "array\push(" command. There is no way to remove an item, and we should have one. This post https://forum.espocrm.com/forum/gene...link#post79405 goes through a load of code needed to remove something.

    Can I suggest 2 new commands, one that removes an item at a specific location, and one that removes an item with a given value.
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    It's rather reasonable to have two functions:
    - find index by value
    - remove element by index
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • MatLudlam
      Senior Member
      • Aug 2016
      • 288

      #3
      Originally posted by yuri
      It's rather reasonable to have two functions:
      - find index by value
      - remove element by index
      Sounds like a better solution to me. The "find index by value" is something that I would probably have asked for in a few months anyway.

      Comment

      • yuri
        Member
        • Mar 2014
        • 8440

        #4
        Implemented in 7.1 https://github.com/espocrm/espocrm/issues/2256
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment


        • MatLudlam
          MatLudlam commented
          Editing a comment
          Thanks very much.
      Working...