Hi Community
I am retrieving records via Apps Script using the AppSheet API. I am having relative success with the API. However I have encountered strange behaviour when using the Selector property & the record ID is all integers. The record ID was created by AppSheet using the uniqueid() initial value expression. The ID causing problems is 35137629. The other IDs are for example:
Solved! Go to Solution.
Put all of those key values between quotes.
I also recommend never using {} notation for Lists, I know it doesn't work properly in some cases, use LIST() instead.
Looks like you've regressed back to the original issue of not putting the key values between quotes.
Put all of those key values between quotes.
I also recommend never using {} notation for Lists, I know it doesn't work properly in some cases, use LIST() instead.
Thx @Marc_Dillon I tested this:
@Marc_Dillon thought I had this call & filtering sorted. It has worked almost flawlessly for a couple of months. Today I am getting some empty arrays returned. The data is there, some other rows are returned if I test manually & use those rows filter value. My call log looks like this:
Sending Payload: {"Action":"Find","Properties":{"Locale":"en-AU","RunAsUserEmail":"(PII Removed by Staff)","Selector":"Filter(Invoices, [InvoiceID] = 995a780c)"},"Rows":[]}
I am returned an empty array, when there should be 6 rows returned. If I change the filter value to 4865ac2a..
Sending Payload: {"Action":"Find","Properties":{"Locale":"en-AU","RunAsUserEmail":"(PII Removed by Staff)","Selector":"Filter(Invoices, [InvoiceID] = 4865ac2a)"},"Rows":[]}
I am returned all the relevant data. I am at a loss at to what is causing this. Maybe you can see an issue in the call structure that can cause this behaviour?
I followed your advice & double quoted & have pretty robust logging in the actual API fetch call. The columns in the Google Sheet are formatted as text. However it returns a 200 response, just empty! Any help is appreciated. Cheers Brad
Looks like you've regressed back to the original issue of not putting the key values between quotes.
Hi Marc, thanks for the observation, I did several tests & perhaps have messed up my call structure. I'll go over this aspect now. Cheers for the fresh eyes!
I've tried sending the call with the "" log here - Sending Payload: {"Action":"Find","Properties":{"Locale":"en-AU","RunAsUserEmail":"(PII Removed by Staff)","Selector":"Filter(Invoice_Detail, [link_Invoice] = \"ad389abf\")"},"Rows":[]}
Actual call here:
If you can see the error in the actual properties thanks, otherwise I will open a ticket. Cheers Marc.
@Marc_Dillon I did a bit of reading Troubleshooting API calls & it seems my security filters were causing an issue. I've just tested now & the records are all found & returned. So I will need to review my security filters. Turns out the document being processed & not returned via the API was dated 18 Sept, tomorrow & the security filters don't allow documents after todays date! So there we go, I gotta be more careful. PS I've added the "" back into the calls. Thanks for the help. Cheers
User | Count |
---|---|
40 | |
35 | |
30 | |
23 | |
17 |