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.
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.
yes, already in there. But filtered out atm. so its not represented twice.
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.
: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)
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.