I need to show working is the ability to call an external API via a button and pull data from the response back into SharePoint fields (in the form) I can see this below but not sure how I get data back and send to specific fields?
Hi Carl Greenhalgh
For this requirement you can not use the HTTP Request action type since you can not handle the response with this action type. Use instead the Execute Script action type and call the API with an ajax call favored with jQuery.
To write the result into a field on the form get the field controller and set the value like this:
inputController = jQuery('span.ms-formbody[fieldname="YourFieldname"]').closest('.ard-formfield').data('Controller');inputController.InstanseData.SetValue(yourResponse);
More details and the final solution for exactly this requirement you find here in this discussion:
Examples how to use http request
Retrieving data ...