Help

Command to get data as javascript variables

Topic Labels: API
2123 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Gino_Belvedere
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi! Dear,

Would you please let me know is there anyway to have result record as (text)variables in Javascript ?

Image as:

//////////////////////////////////////////////////////////

function getData(){

base(‘New Playlists’).select({
filterByFormula: ‘ID = MyFunIDValue’,
}).eachPage(function page(records, fetchNextPage) {
records.forEach(function(record) {
return record.get(‘ID’);
});

}, function done(error) {

});

}

var data = getData();

alert(data);

//////////////////////////////////////////////////////////

in this way I could have only result “undefined”…

I thought it is trouble with asymetric treatment.

but it didn’t work well

like this…

$.when(
getData()
).done(function(){
alert(result);
});

Please tell me what should be fixed or is there another command smart,

like just

getData(table,field,formula)

0 Replies 0