Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    It's rather reasonable to have two functions:
    - find index by value
    - remove element by index

    Comment


    • #3
      Originally posted by yuri View Post
      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


      • #4
        Implemented in 7.1 https://github.com/espocrm/espocrm/issues/2256

        Comment


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