
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 04, 2022 11:28 AM
Currently, I load data from my base then individually go through them individually to convert the data to strings. Is there a way to read the data as string when loading?
let people = ;
base(“Employee”)
.select({
view: “Grid view”
})
.eachPage(
function page(records, fetchNextPage) {
records.forEach(function(record) {
let pp = new person();
pp.name = record.get(“Name”);
pp.role = record.get(“Role”);
pp.cards = record.get("(Relevant) Cards");
people.push(pp);
});
fetchNextPage();
},
function done(err) {
if (err) {
console.error(err);
return;
}
}
);
class person {
constructor() {
this.name;
this.role;
this.cards;
}
formatRole(){
if(this.role != null){
let is = ;
for (let i = 0; i < this.role.length; i++) {
base(“Employee”).find(this.role[i], function(err, record) {
if (err) {
console.error(err);
return;
}
is.push(record.fields.Name);
});
}
if(is.length == 1) this.role = is[0];
else this.role = is;
}
}
}

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 04, 2022 12:37 PM
Welcome to the Airtable community!
No, you do not get to choose the format of the data when using the REST API. This is different from using Scripting.
