I have a function below running with google script to retrieve appsheet data via API call.
Everything works, however, I am unable to filter the data. What ever I do with selector, the appsheet API still return all the row, even when I intentionally makes some mistake in Filter query.
That’s not quite right. You’re already inside of a double-quote around the entire selector value, so your double quotes around the column value are messing that up. If you just use single quotes for one of the pairs, you’d be good.
The key value is the actual value in the column. If you need a different value from the referenced table, you can create a virtual column to pull that value via dereference, which should be available from the API.
i am trying to update rows with identifier filtered from “selector:” with HTTP request body as below. However it always returns 400 code. Pls show me how to update rows based on filter
{
“Action”: “Edit”,
“Properties”: {
“Locale”: “en-US”,
“Location”: “47.623098, -122.330184”,
“Timezone”: “Pacific Standard Time”,
“Selector”: “FILTER(DiemXetTuyen, [ma_ho_so]=<<[_THISROW].[ma_ho_so]>>)”
},
“Rows”: [
<Start:_THISROW].[ma_to_hop].[to_hop_xet>
{
“loai_diem”:“<<[ma_mon]>>”
},
<>
]
}
Please recommend me the body request in this case. I edited my body http request as below:
{
“Action”: “Edit”,
“Properties”: {
“Locale”: “en-US”,
“Location”: “47.623098, -122.330184”,
“Timezone”: “Pacific Standard Time”
},
“Rows”: [
<<Start: FILTER(“DiemXetTuyenSinhVien”, [ma_ho_so] = [_THISROW].[ma_ho_so])>>
{
“loai_diem”: “<<INDEX([_THISROW].[ma_to_hop].[to_hop_xet],1)>>”
}, <>
]
}
Note: to_hop_mon in the above example is a list of ma_mons. Here I take the first value of the list to check. However the code returned is 400.
The SELECTORS key only functioning within the FIND action in the body of the HTTP request.
Your collection rows by FILTER or SELECT formular inside ROWS key.