FIND formula - wrong data

  • saillmone-1306637340822995008

    saillmone

    2 months ago

    Hi everyone, I have a problem with the Find formula.
    I feel like my Item.id is never browsed.

    the selectedOption variable is OK, it varies depending on the choice of the select.

    It's just that find always returns me id 11 (index 0).

    How can I do ?

    Thank you for your help and long live Toddle ❤️ ❤️ ❤️
    1306637341317927033-
  • tomthebigtree-1306645112075325503

    Tom Ireland

    2 months ago

    It looks like you've selected the record of index 0 to be the input, so you're only looking at one record. You need to choose data as the input to browse all records in the array and pick them out based on id.
  • saillmone-1306650971350503487

    saillmone

    2 months ago

    No, there are 4 items in the array.
    -> data[0] = products
    and then in the products I have several variants (here 4)
    1306650971258097664-
  • lucasg-1306656488743501884

    Lucas G

    2 months ago

    You can use Filter instead
  • saillmone-1306715889311420468

    saillmone

    2 months ago

    Thank you for your feedback, I was able to understand the map and filter like that.
    I thought differently and put the index value in the selectedOption and then just did a GET['selectedOption'] in the array. Fewer formulas, more efficiency!
    A good beer made me think better!

    Thanks again, I love this community.

    Toddle ❤️

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.