Can't add first item from state to RG (source = API), bug?

Hi

I cant seem to add the first item from a state on my RG that has a API as source.

The other way around using “plus item” works fine.

How do I solve this?

Nb. The state is located on the page “app” and has the same type as the API. Also, sorting does not work as only one list is sorted, and not the collective set of items.

image

It seems this is a Bubble bug.

Anyone know how to do this?

Make a: 1 item + list of items (API type)

Your setting seem fine. Is the item from state already exist in the RG list of items?
For sort, did you activate the parenthesis feature? If not, activate them in settings tabs and add the sort totally at the end of the expression.

  1. yes, already in there. But filtered out atm. so its not represented twice.
  2. parenthesis is active, but the sort should be on the list only. the plus one item is static, while the list of items from the API chances depending on user location.

My goal is to have the plus 1 item as the first item and the list of items sorted by distance after that.

Example:
X + A,B,C,D,E,F…

:converted to list is not available from what I know on API data.
Oh do you set the “unique” item in the state?
Because what I think , is that you could use something like that, directly in RG data source:
Get data from API:filtered (filters goal is to return only one item, but keep it as a list):merged with Get data from API (filter, now the goal is to filter out the first item)

1 Like

Thanks @Jici saved my day! Small thing, but works. A bit of a hassle, but ticking off list and the page showed up in the list of sources. Writing single items to and from the state is a bit more complex but doable.
:vulcan_salute:

1 Like

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