Pricing Blog

Logic for Finding and Retrieving Associated Records Between Two Data Sources

  • andyputilin-1364032330708287629

    Andy Putilin

    2 months ago

    Hello, need a little help with what I believe is toddle logic.

    I’m building a CRM page and pulling in data from two APIs — one for deals and one for vehicles (stored in Xano). Each deal can be linked to a vehicle using an ID field.

    What I’m trying to do is this:

    When someone’s viewing a vehicle card in the CRM, I want to automatically check if that vehicle appears in any of the deals. If it does, I want to pull in the info from the matching deal and display it alongside the vehicle. Kind of like showing deal context directly within the vehicle profile.

    Right now in Toddle, I’m looping through the deals and comparing the vehicle ID to the current vehicle being viewed. I’ve been trying to make this work with a formula, but it’s not returning anything. Clearly I’m missing something 😅

    Dropped a screenshot of what I’ve got so far. Just wondering what the best way is to structure this logic. Should I be filtering differently, or is there a better way to query it from Xano?
    1364032331555278889-image.png
    1364032332067241995-image.png
    1364032332499124224-image.png
  • kingdragxn-1364054864451338430

    Jay | DRAGXN

    2 months ago

    Hello! 🙂

    Could you share your the URL of your editor so I can take a look? You can send it in a DM if you don’t want it public.
  • lucasg-1364100788087160924

    Lucas G

    2 months ago

    That equals node is checking a string against an array. You’ll need to change the formula to get a proper Boolean response
  • andyputilin-1364129977359925268

    Andy Putilin

    2 months ago

    How do I convert the array into a string but then do it in a way where it checks it for each vehicle though?
  • filip_dajkovic-1364149625816219709

    Filip Dajkovic

    2 months ago

    You need to change it to look like this
    1364149625644126290-CleanShot_2025-04-22_at_10.02.592x.png
  • lucasg-1364212365591056404

    Lucas G

    2 months ago

    As Jay said, are you able to share the project or what data looks like so we can help
  • kingdragxn-1364260487654805535

    Jay | DRAGXN

    2 months ago

    Don't worry, we were up for 8 hours and got everything working... 🤣
  • lucasg-1364260700532244501

    Lucas G

    2 months ago

    8hrs??? @Andreas Møller maybe this guy could be our next viking...
  • andyputilin-1364455815385186366

    Andy Putilin

    2 months ago

    not maybe, he IS the next viking!
  • andyputilin-1364461854004351087

    Andy Putilin

    2 months ago

    Huge thanks to @Jay | DRAGXN man’s a legend.
    I reached out with a small issue in my app and he ended up hopping on a call with me for eight hours. Walked me through way more than I expected. Gave me a full rundown on how Toddle actually works. Before the call, I was maybe using 1 or 2 components per page. Now I’m using 1 or 2 div blocks. Whole different ballgame 😂 He also helped me completely reorganize my backend. I had everything smashed into a few tables, and he showed me how to clean it all up and actually structure things right.

    If you need an app built in Toddle. ahem... Nordcraft, he’s 100% your guy.

    Huge thanks man! I'm actually starting to wrap my head around how to build with components now.