Can't figure out how to get this list to output what I need!

I’m stuck on this problem, and I tried the group by and filter functions but I can’t get the list I need returned.

I have a date type Jobs. Within Jobs is creator, shift date, shift price.

A creator might post multiple jobs, so I want to output a list that only prints a single Job from each creator, by the earliest shift date.

I tried this, which is returning the right number of items back, but it reference’s the Job’s Creator, and not the Job itself so I can’t figure out how to output the shift price per job.

Or if I use the filter by unique elements

image

I can’t reference the Job from there.

I basically want to group each Job by it’s creator, and each items: Shift Price (or other fields within Jobs)

Hey @ramzizi :wave:

Have you tried adding ‘formatted as text’ at the end of the search so you can do extra searches inside and references if you need to. Does that help? Is that what you were going for? Let us know. :blush:

Hey @J805 ,

I can do that, or even reference the Creator as the User, but then I get really confused as to how to perform a nested search from there to get what I need. Under the User field, I even have a list of all Jobs that specific Creator posted.

I get to the point where I have a list of individual, non-duplicate Job Creators, but then from there I can’t figure out how to print a list of each of their first Jobs

What would solve all this is if I could put each item’s:first item at the end of this:

1 Like

You can do formatted as text after the search for PostedShifts. You can also try to do something in a workflow by ‘making changes to a list of things’ to access what you need although you won’t be changing any of the data. Sometimes sending things in steps is easier to work with.

There is also a way to do ‘filtered’ and then do ‘Advanced’ if you need to. Although, I strongly recommend reorganizing your data structure to make it more easily accessible instead of doing advanced filters. Sometimes saving a value on a record or adding a new field can save your self a lot of WU.

Let me know if that helps guide you in the right direction. There are a few different ways of doing this. :blush:

Ahh sorry my brain is just not processing

If I use the group by option, what am I doing next? Because this is returning a “List of Groupings” which I can’t pull any data off of, rather than a List of Jobs

I’ve tried filtering options too and I’m just not getting it :melting_face:

Whenever I can’t figure something out, I write it out on a piece of paper. That way I have exactly what I am trying to do on paper. If I can do it on paper, then I can do it in Bubble.

Based on your database setup:
Jobs

  • Creator
  • Shift Date
  • Shift Price

Can you do 'Do a Search for Users' : formatted as text' then on the inside of that, Do a search for Jobs and put the constraint as ‘this user’. Then sort it by date and display the data you want.

Unless you have a way to get a list of users a different way, then do the same thing after that.

Does that help at all?

1 Like

Thank you @J805 !

I finally got it sorted properly. Unfortunately it opened a new can of worms in my specific use case that I won’t bother getting into.

Why doesn’t Bubble just let you refer back to the original data type when using the “Group By” function. It makes a new pretty much useless “List of Groupings” that no one can do anything with :rage:

1 Like

Yeah, I can see how that would be super helpful for sure. There are some things that you can access, if you need a sum of something or another number for each grouping. Otherwise, format as text, then do another search is the way to go. :blush: Glad yo got it sorted. :raised_hands: