Repeating Group: Don't know item # to scroll to

How do I scroll to an item # of a list when I know it’s value but I don’t know its position in the list?

I have a Repeating Group (Warehouse A Inventory) of Data (Type: Part). Each Part has a Part Number (unique numbers), Name, Description, etc.

I’m trying to use a workflow to “Scroll To” a specific Part Number in Repeating Group Warehouse A Inventory’s List of Part’s Part Numbers–a dynamic list based other user-specified criteria so the part number could be anywhere in the list.

So I know:

Part Number I’m trying to scroll to = 210 (stored in Custom State “This Part Number” Type: number)
RG Warehouse A Inventory’s List of Parts Part Number = 123,150,175,176,180,210,215,290…

I’ve tried using other functions along with “Item #” but I can’t come up with a valid expression. How do I complete this box?

Entry to scroll to: Repeating Group Warehouse A Inventory’s List of Parts:item #???

I can’t expose the app and I don’t need specifics, just looking for the thought process to accomplish this…I’m so stuck on the way I know how to do it when I know the item # that I can’t come up with viable solutions…Bubble Fog.

Hi @meyerhd2 :slight_smile: Are Users first shown a list of numbers (with the data source being Part Numbers? type: number). Once a number is clicked, that number stored in a custom state (also of type number), and then you’d like to scroll to the corresponding Part (with that Part Number) in the Warehouse Inventory’s List of Parts repeating group?

Yes, that’s basically it @fayewatson.

I’ve thought that I could count the number of items in the Warehouse Inventory List that are > “this part number”, then substract that from the count of the total number of items in the list? That should give me the “item #” of “this part number” IF the list was sorted chronologically (which it isn’t specifically…I’d have to think about whether that would change other things).

Maybe that’s my only option, but for a seemingly innocuous task I thought there was probably a more obvious way (to someone else!) of how to get that item # or there was some other feature within Bubble that I’ve never used.

Got it! :slight_smile:

For the numbers repeating group, could you change that type of content to Part Number, and then just display the different Part Numbers in a text element within that repeating group? Then if a number text is clicked in that repeating group, you could use the Scroll to entry on the second repeating group using:

Scroll to Entry of Warehouse Inventory Repeating Group -->
Entry to Scroll to: Current Cell’s Part

Alternatively, if you need to keep the numbers in the repeating group, when a number text is clicked in that repeating group, you could use the Scroll to Entry action on the second repeating group using:

Scroll to Entry of Warehouse Inventory Repeating Group -->
Entry to Scroll to: Do a Search for Parts (constraint, part number = Current cell’s number): first item
*This will scroll the User to the first Part in the repeating group which has a part number that matches the number the User just clicked on within the first repeating group

If you are going to stay with the custom state, the scroll to entry action would be:

Scroll to Entry of Warehouse Inventory Repeating Group -->
Entry to Scroll to: Do a Search for Parts (Constraint, part number = [custom state’s value]): first item
*This will scroll the User to the first Part in the repeating group which has a part number that matches the custom state, after the custom state is set

That should work! But let me know if not! :slight_smile:

Yes @fayewatson that is it!

I can’t thank you enough for devoting your time to helping out!

I spent two days going in circles…like being lost in the woods and not realizing i was going in circles. You are a great guide!

1 Like

Aww thank you so much, @meyerhd2! :blush: It’s my pleasure! I know that feeling of going in circles very well, too!! So happy you got it working as you needed it to! :sparkles:

This topic was automatically closed after 70 days. New replies are no longer allowed.