Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to fill a dropdown with data from API

Simon Larson
Contributor
November 10, 2022

Hi,

I'm trying to make a form that lets our employees fill in their monthly travels, where they select a date, starting/end location and some other stuff. I want a dropdown menu containing every country in the world and I'm trying to get the information using this API:

https://skatteverket.entryscape.net/rowstore/dataset/70ccea31-b64c-4bf5-84c7-673f04f32505?%C3%A5r=2022&_limit=500&_offset=0

I added the Webservice connection to my ConfiForms configuration page and the connection is successful. But when creating the Webservice dropdown I can't seem to get the configuration right as the dropdown menu always returns completely empty.

URL added to the config page: https://skatteverket.entryscape.net/rowstore/dataset/70ccea31-b64c-4bf5-84c7-673f04f32505

URL used as "Service URL" in macro config: /dataset/70ccea31-b64c-4bf5-84c7-673f04f32505?land%20eller%20omr%C3%A5de=a&%C3%A5r=2022&_limit=500&_offset=0conf.png

Tried experimenting with root to use, field for label and ID, but nothing works.

Any help is greatly appreciated

1 answer

1 accepted

1 vote
Answer accepted
Alex Medved _ConfiForms_
Community Champion
November 11, 2022

Hi

Here is a small demo that should help you

WS configuration

Screenshot 2022-11-11 at 10.40.03.png

Little form that has a web-service enabled field listing all the countries

http://recordit.co/3Mha5MslBM

Alex

Simon Larson
Contributor
November 11, 2022

Appreciate the fast response, Alex. The solution you provided works, problem was how the URL was constructed. Thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events