Hey Bubble community,
I am having trouble setting a filter on a repeating group. I want the group to show only the new hires (name) incoming in the current month - one name per row.
At the moment this is the closest configuration that I have been able to get to:
Any help very much appreciated.
Is it a list of users or are Sarah and Helen saved as different entries? Because you might need two RGs to display a list of users for a list.
I’ve detailed more on this here - https://medium.com/@himanshu_/how-to-display-a-list-in-a-repeating-group-in-bubble-io-726b2d8abab2
Thank you for sharing. Sarah and Helen are saved as custom data type ‘new employee’, they will not be users. Would following your blog be correct for this?
If you could show me your database, I could guide you better.
If Sarah and Helen are not users and just text saved individually, then a single RG will suffice. The data type of the RG will be ‘New Employee’ and data source will be Do a search for -> Type ‘New Employee’ with constraint Created Date < Current date/time + days:30.
This will get all the entries in New Employee which were created in the past 30 days.
Thanks @sharma.himanshu0608 Here is the database currently:
Single RG will work.
The data type of the RG will be ‘New Employee’ and data source will be Do a search for -> Type ‘New Employee’ with constraint Start Date < Current date/time + days:30.
Advanced filter is not really required
Ok great - thanks for your help @sharma.himanshu0608. I am still not able to get it to show only one name per line but will play around with it based off your solution.
Is there a reason you’re doing the filtering client-side as opposed to using constraints in the search that’s specified for the Data source property of the RG?
I’m not sure I totally follow you. Are you referring to adding the filter to the RG instead of the Text?
There is no specific reason that I am applying the filter where it is at the moment, I am new to bubble so this is my first time trying to add constraints/filters
I was just curious, what does the Search for New employees expression (for the Data source property) look like? Can you share a screen shot? Are there any constraints there?
at the moment I have it like this:
One approach would be to specify your filter where it says Add a new constraint. That “filtering” happens on the server when the data are retrieved from the DB, as opposed to happening in the browser after the data have already been retrieved. Do similarly for “next month”.
Alternatively, you could retrieve 2 months worth of data from the server and then use client-side filtering to split the search results into “this month” and “next month”. That way, the server is being hit just once, and the results are further “refined” (filtered) for each RG after they get to the browser.
Either way, you’d specify start and end dates (either one or two months) in the search constraints.
Thanks for your help @sudsy - will try this out
This topic was automatically closed after 70 days. New replies are no longer allowed.