Hi there, I am working on creating a user cms for our web app. My goal is gather a record’s information from a button click. I am currently getting the record based upon the click but I am only getting the ‘id’ and ‘name’ as part of the returned record object. Here is the code so far
let table = base.getTable("Users");
let fieldsToInclude = table.fields.filter(field => field.name !== "Update User");
let record = await input.recordAsync('Update user', table, {fields: fieldsToInclude});
console.log(record, fieldsToInclude);
The console output is:
{id: "recmKNtwayYQNFu0K", name: "Kelly"}
(9) vObject, Object, Object, Object, Object, Object, Object, Object, Object]
0: Object
id: "fldMqI2JmcuRkwOru"
name: "First Name"
description: ""
type: "singleLineText"
options: null
isComputed: false
1: Object
2: Object
3: Object
4: Object
5: Object
6: Object
7: Object
id: "fldVQSI2xjMjdunEi"
name: "Initiative"
description: ""
type: "singleLineText"
options: null
isComputed: false
8: Object
Why am I only getting the record id and name even though I pass an array of field objects? I have tried maping the array to only return field ids, then field names but neither seem to work. Any help or insight would be greatly appreciated!