Delete not working as excepted

  • saillmone-1369593129572896820

    saillmone

    11 days ago

    Hi guys, I'm having a problem with the Delete (or Filter) function.
    I'd like to retrieve the array value once the Delete function has been executed.
    I feel like I'm missing something, but I'm going around in circles. I've been stuck on this nonsense for 30 minutes.

    Can someone please point me in the right direction?
    Thanks!
    1369593129732145234-image.png
    1369593129988001973-image.png
  • andreasmoller-1369600750593904700

    Andreas Møller

    11 days ago

    I am not sure I get the problem.

    Do you want to retrieve the deleted value or the remaining one?


    Delete removes an items in an array based on the index.

    In this example it will remove the first item and leave an array with just one element.

    After you have updated the variable you can no longer access the removed item.

    If you want to remove and item from a list and save it, then you would do it in two steps:

    1. retrieve the item from the array and store it in a separate variable
    2. Update the array variable and delete the item
  • Does that help?
  • saillmone-1370359659604475984

    saillmone

    9 days ago

    Hi Andreas, thanks for your feedback.
    Your comment was very helpful, even if I didn't exactly apply what you said.

    Thanks again.