PricingBlog

Trouble listing race results

  • lukasmohr-1214485758744993902

    Lukas Mohr

    1 year ago

    I'm trying to list race resutls from an api. Each race is defined using a race_id. I want to group the players by race_id so that they show in the same box. Currently when I try to repeat the div box I get them all in seperate divs. Can anyone point me in a direction of how to group data by an indentifier?
    1214485759524995092-image.png
    1214485759172804619-image.png
    1
  • erikbeus-1214486074718556160

    Erik Beuschau

    1 year ago

    There is a Group by formula which might work for you? In the callback for that formula, you will need to pick the property to group by
  • lukasmohr-1214486825243250730

    Lukas Mohr

    1 year ago

    Like so?
    1214486824995528804-image.png
  • lukasmohr-1214487098892230676

    Lukas Mohr

    1 year ago

    Or should it be grouped already on the outer div?
  • erikbeus-1214487200759025664

    Erik Beuschau

    1 year ago

    I think you should only have your Item on the left and then pick the race_id in the Group by formula?
  • You should probably group it on the outer div yes 👍
  • Group by returns an object, so to iterate over that object afterwards, you would use the Entries formula
  • lukasmohr-1214488391916199936

    Lukas Mohr

    1 year ago

    I have repeated the outer div "card" like so. But I don't see any data on the list of players?
    1214488389823500339-image.png
    1214488390356049940-image.png
  • erikbeus-1214489013432487976

    Erik Beuschau

    1 year ago

    What does your output from the Group by statement look like?
  • lukasmohr-1214489133741776897

    Lukas Mohr

    1 year ago

    This one is blank
    1214489133506887680-image.png
  • erikbeus-1214489504115720232

    Erik Beuschau

    1 year ago

    Ah, so you can't expand the output? Could you invite me to your project perhaps? Username: god_of_code
    1
  • erikbeus-1214491902859149322

    Erik Beuschau

    1 year ago

    Can I change things on the race-results branch?
  • lukasmohr-1214492031611707402

    Lukas Mohr

    1 year ago

    Yes, go for it
    👍1
  • erikbeus-1214492879892774983

    Erik Beuschau

    1 year ago

    Could you have a look at it now? I used Group by + Entries on the outer div, and referenced the values in the inner div. Not sure if it looks like you planned?
    1214492879406366720-Screenshot_2024-03-05_at_09.40.25.png
    1214492879649775668-Screenshot_2024-03-05_at_09.40.35.png
  • lukasmohr-1214493154162638938

    Lukas Mohr

    1 year ago

    Perfect! Works as intended now 😄 Many thanks
    🙌2
  • erikbeus-1214493630325194812

    Erik Beuschau

    1 year ago

    Great to hear 🙂