I tried to obtain SLICE data using AppSheetApi in GAS.
Scripts are below.
new_slice : Sliced data table name
const url = 'https://api.appsheet.com/api/v2/apps/' + appId + '/tables/' + new_slice + '/Action';
const payload = {
'Action':'Find',
'Properties':{
'Locale':'ja-JP',
'Timezone': 'Tokyo Standard Time',
'Selector': 'SELECT(new_slice,TRUE)'
},
'Rows':[]
};
const params = {
'contentType': 'application/json',
'headers':{
'ApplicationAccessKey': apiKey
},
'method':'post',
'payload':JSON.stringify(payload)
};
let appsheetData = UrlFetchApp.fetch(url,params);
Data could be acquired, but the data to be obtained was partially different.
Key is correct. However, the corresponding value is incorrect. It seems to refer to the value of the table before slicing.
Please fix if it is a bug.
thank you for reading.
Solved! Go to Solution.
Oh I see.
The help article for the "Find" API method makes no mention of working on a Slice. So I wouldn't really expect it work flawlessly.Although it still might be good to send this to support.
For now, I'd suggest calling the API on the base Table, and using your script to pull only the required columns.
User | Count |
---|---|
18 | |
11 | |
7 | |
5 | |
5 |