Home > Forum > General > Populating Dropdown List from REST

Populating Dropdown List from REST
0

Hi there
has anyone an example on how to populate dropdown lists from REST data sources ?
I got the working requests in POstman, but I cannot get them to work at all in webcon.
and its kinda hard to debug since error messages or logs are seemingly not available...

thanks for your help in advance.

MVP

Hi Denckert,

there's not any difference in populating a drop down via a REST data source or any other.

Once the REST data source is defined you are good to go. This is explained here:
https://community.webcon.com/posts/post/rest-data-sources/173/27

Regarding logs, where does it fail?
Does the test of the data source definition work in the Designer?
Otherwise you could check the following:
Enable diagnostic tracing from the avatar icon, load the Form, save the session and open the link with an admin user.
If you can use it in a path transition action you can take a look at the history, switch to admin mode an click on the action. You may be able to get additional information there. If you are using a rest action the whole request with body, headers and response will be logged. :)

Best regards,
Daniel

In reply to: Martin Meze (Freelancer)

Hi there! Is the REST publicly available and can share details about it? It would be much quicker to help on a real case.

maybe I am missing something, but to me , WEBCON throws an error message right when I edit the get requests in the datasource.
the complete get request works flawlessly in POSTMAN, yet it cannot be ported to webcon without fail

the api is from MS Business central
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/endpoints-apis-for-dynamics

I tried both oauth2.0 and anonymous connections and the error is the same, see pic / screenshot

MVP
In reply to: Denckert, Lutz

maybe I am missing something, but to me , WEBCON throws an error message right when I edit the get requests in the datasource.
the complete get request works flawlessly in POSTMAN, yet it cannot be ported to webcon without fail

the api is from MS Business central
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/endpoints-apis-for-dynamics

I tried both oauth2.0 and anonymous connections and the error is the same, see pic / screenshot

From the print screen it looks like you're getting an HTML response with the login form and not json as Webcon expects. Are you using the same account when making the call from Postman and Webcon?

Also, in the scope URL you have a dot before the word "default". Is this correct?