Custom app Remote procedures

:bullseye: What is your goal?

I want to have a dropdown that populate options by calling an api call after successful connection established.

:thinking: What is the problem?

I am not able to populate dropdown in my module with what i get from this api call

:test_tube: What have you tried so far?

i have created a rpc which looks like below

[
{
“name”: “getTeamMembers”,
“communication”: {
“url”: “https://meetapp-53105.bubbleapps.io/version-test/api/1.1/obj/User”,
“method”: “POST”,
“type”: “json”,
“headers”: {
“Authorization”: “Bearer {{connection.accessToken}}”,
“Content-Type”: “application/x-www-form-urlencoded”
},
“response”: {
“limit”: 500,
“iterate”: “{{body.response.team}}”,
“output”: {
“label”: “{{item._id}}”,
“value”: “{{item._id}}”
}
}
}
}
]

And my module mappable code looks like this
[
{
“name”: “member_id”,
“type”: “select”,
“label”: “Team member”,
“required”: true,
“help”: “Select a team member from your organization.”,
“options”: “rpc://getTeamMembers”
}
]

but it does not populate this dropdown

:camera_with_flash: Screenshots: scenario setup, module configuration, errors



1 Like

Your drop down stays empty because the RPC isn’t returning a list. Use GET and iterate Bubble’s real path:

"method": "GET",
"iterate": "{{body.response.results}}"

Once the RPC outputs {label, value} items, the drop down will fill instantly.

1 Like