Getting Data from a Static URL

You may need to connect and iterate through data exposed to you through an external application or even some of GlobalForms 10’s internal calls, such as a list of forms or results from it’s database connector. The example below is an example of how to connect to a URL and iterate through the results, which could be used to set a field or populate another object, such as a datagrid.

var payloadresult; var formioBaseUrl = Formio.getBaseUrl(); const formio = new Formio.makeStaticRequest("theURLToQuery"); Formio.makeStaticRequest("theURLToQuery").then((payloadresult) => { console.log(payloadresult); if (payloadresult.rows) { // Loop through each row of the result and show each result in developer console. for(var i=0;i<payloadresult.rows.length;i++) { console.log(payloadresult.rows[i]); } } });

 

Â