Unable to Connect Input Value to Repeating Group API “Limit” Parameter

Hi Bubble community,

I have a Repeating Group (RG) that displays posts from the DummyJSON API. I want the number of rows in the RG to be controlled dynamically by an Input field (e.g., “Rows per Page”).

I’ve set up my API call in API Connector with a parameter limit. I initialized it with a number, and now I want to pass the Input’s value to this limit parameter in the RG’s data source.

Problem: When I try to set the RG’s data source as Get DummyJSON Posts's limit = Input Rows per Page's value, Bubble does not allow me to insert the dynamic input value—it only shows the static initialized number.

What I’ve tried:

  • Made sure the Input’s content format is Number

  • Initialized the API with limit = 0

  • Tried using workflows to refresh the RG

I want the RG to update automatically based on the Input value. How can I correctly connect an Input element to a dynamic API parameter in Bubble?

Bubble bot says:

Great question! The issue you’re experiencing is common when working with API parameters in repeating groups. Here are a few approaches to solve this:

Method 1: Use a Custom State

Instead of trying to pass the input value directly to the API parameter, create a custom state on your page:

  • Add a custom state (type: number) to store the limit value
  • Set up a workflow that triggers when the input value changes to update this custom state
  • Use the custom state value in your API call parameter

Method 2: Configure Repeating Group Rows

You can also control the display without changing the API limit:

  • Set your API to return more data than needed (e.g., limit = 100)
  • In your repeating group settings, check “Set fixed number of repeating rows”
  • Set the “Row count” to reference your input field’s value dynamically

Method 3: Workflow-Based Refresh

  • Create a workflow triggered by the input’s value change
  • Use “Display data in repeating group” action to refresh the RG with new API parameters
  • This gives you more control over when the API call happens

The key is that API parameters often need to be set through workflows or custom states rather than direct dynamic references in the data source field.

Would you like me to walk through any of these methods in more detail?

BubbleBot • AI Agent • Just now

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