How do I use data from an API call as inputs for an Apex Graph, like in the dashy template?

  • liltisa8661-1305299186517938226

    Hausia

    4 months ago

    Looking to use data pulled from Airtable as inputs for a line graph.
  • chrislaupama-1305307039794466826

    Chris Laupama

    4 months ago

    There’s definitely a number of ways to do this.

    One would be to save the data upon success of the API call to a variable.

    Then use the data from that variable within the graph.
  • chrislaupama-1305308840539062272

    Chris Laupama

    4 months ago

  • liltisa8661-1305347556712251403

    Hausia

    4 months ago

    I'm actually pretty proud of myself, I had set everything up just the way you did haha

    But he's actually not using table data for that graph, just manual inputs (see screenshot)

    I want to know how to use arguments with actions.
    1305347556548804608-Screenshot_2024-11-11_at_2.44.14_PM.png
    ❤️1
  • liltisa8661-1305351410568921158

    Hausia

    4 months ago

    This is what I want to use
    1305351410401021973-Screenshot_2024-11-11_at_3.00.15_PM.png
  • Tod-1305351412263292952

    Tod

    4 months ago

    Great energy @Hausia! Your continuous contribution to the toddle Community just made you advance to Community Level 1!
  • chrislaupama-1305351607428583475

    Chris Laupama

    4 months ago

    Arguments are just a way to pass data into the custom action.

    So think of them as variables.

    You create an argument, let’s say you create an argument called “name” then within the code you use the argument by using 'args.name'

    In that screenshot you can see on line 4 and 49 they are using 'args.containerId'
  • chrislaupama-1305352261391749191

    Chris Laupama

    4 months ago

    Okay, you will need to ensure you are shaping the data to utilise it the way that the apex library requires it to be utilised.

    Lots of ways to do that.

    We can jump on a call at some point if you want to go over it bro.
  • liltisa8661-1305352289564753942

    Hausia

    4 months ago

    Free now?
  • 403406193655021568-@Hausia
    Free now?
    chrislaupama-1305352342060662874

    Chris Laupama

    4 months ago

    Sweet ping me with meeting link
  • liltisa8661-1305352610747781120

    Hausia

    4 months ago

    Sent
  • chrislaupama-1305373305313824811

    Chris Laupama

    4 months ago

    @Victor Giron & @Lucas G

    Any thoughts?

    Trying to use the airtable data, but I think the custom action is loading before the Airtable data comes through.

    I've set a console log to show the array that passes to the custom action and it's showing it with an array of 3 empty items...

    Here's the project link: https://toddle.dev/projects/peach_tion_medon_busy_rhinoceros
  • lucasg-1305373767895089185

    Lucas G

    4 months ago

    Test running the custom action on success of the API call
  • Use the 'isLoading' part of the call to set a placeholder graph/img
    💯1
  • Or just a spinner loader
  • chrislaupama-1305374058791178281

    Chris Laupama

    4 months ago

    Omg, didn't even think about that lol
  • Yeah, that worked
  • Legend, thank you!
    👍1
  • liltisa8661-1305375763532611625

    Hausia

    4 months ago

    @Chris Laupama english please hahaha
    😂1

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.