Select lists from external data end points

924
1
10-17-2016 07:19 PM
TomBryant1
New Contributor

Is it possible to have an option where the select_one options are populated from a web api JSON end point (or any type of server generated data)?  

e.g. http://server/getStreetNames.  

This endpoint would return a list of name,label pairs exactly like in the choices tab.

e.g.

[

{Name: 2578, Label: "main street"},

....

]

This would replace having to manually load the data from CSV files for data that changes frequently i.e. Business Names.

 For offline use, it could call the end point to begin with, or have a back up CSV list to choose from of older data.

In future it could also autocomplete by calling the end point with a query param:

http://server/getDogOwnerNames?search=john which would return the list filtered where name like john.

This should make things easier for larger data sets like street names while making sure users enter only information that currently exists.

Cheers

Tom

Tags (1)
1 Reply
DougBrowning
MVP Esteemed Contributor

I asked about this many months ago too.  The issue I see with your method is what if you are offline?  The value reload would have to be done on a form refresh or something while you were connected to the net.

0 Kudos