PricingDocsAcademy
Bluesky ...
Wed, Dec 11, 10:04 PM

FIND formula - wrong data

  • /attachments/1306637340822995008/1306637341317927033/image.png

    saillmone

    27 days 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 ❤️ ❤️ ❤️
  • Tom Ireland

    27 days 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.
  • /attachments/1306637340822995008/1306650971258097664/image.png

    saillmone

    27 days ago

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

    27 days ago

    You can use Filter instead
  • saillmone

    27 days 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.