Clarity on Selectors in Appsheet Read API

Please tell me what I’m doing wrong here as the selector does not work:

function getAppSheetAPIUniqueRideIds() {
const url = [https://www.appsheet.com/api/v2/apps/](https://www.appsheet.com/api/v2/apps/)${appId}/tables/${tableName}/Action
const uniqueRideIds = getUniqueRideIds()
rideIdSelector = "Filter("Log Data", Or(${uniqueRideIds.map(rideId => [Ride Id] = “${rideId}”).join(", ")}))"
Logger.log(rideIdSelector)
const payload = {
Action: “Find”,
Properties: {
Locale: “en-US”,
Timezone: “UTC”
},
Selector: rideIdSelector
}
const options = {
method: “post”,
contentType: “application/json”,
headers: {
“applicationAccessKey”: accessKey
},
payload: JSON.stringify(payload),
muteHttpExceptions: true
}

I think the double quotes around the whole thing is causing the problem?

Try it without

  • `Filter("Log Data", Or(${uniqueRideIds.map(rideId => `[Ride Id] = "${rideId}"`).join(", ")}))`
    
1 Like