[Progress Communities] [Progress OpenEdge ABL] Forum Post: ablFilter error - can not find out whats wrong...

  • Thread starter Thread starter noekleb
  • Start date Start date
Status
Not open for further replies.
N

noekleb

Guest
This gives error 400 and no logfile: http://localhost:8080/CarkWeb/rest/ProdService/Prod?filter={%22ablFilter%22:%22prodnr%20=%20%27209215%27%22 } This gives error 500 and a entry in the logfile: http://localhost:8080/CarkWeb/rest/ProdService/Prod?filter="ablFilter":"prodnr = '209215'" 18/01/22@10:40:54.007+0100] P-010820 T-009988 1 AS-12 -- (Procedure: 'ReadProd Prod' Line:250) Filter: {"ablFilter":"prodnr = '209215'"} [18/01/22@10:40:54.008+0100] P-010820 T-009988 1 AS-12 -- ablFilter must be a quoted constant or an unabbreviated, unambiguous buffer/field reference for buffers known to query . (7328) [18/01/22@10:40:54.008+0100] P-010820 T-009988 1 AS-12 -- Unknown attribute prodnr = '209215'. (3538) [18/01/22@10:40:54.008+0100] P-010820 T-009988 1 AS-12 -- Failed to auto-prepare an automatic fill query. (11981) [18/01/22@10:40:54.008+0100] P-010820 T-009988 1 AS-12 -- FILL of buffer ttprod with user-supplied query requires that the query be QUERY-PREPARED. (11876) /*------------------------------------------------------------------------------ Purpose: Get one or more records, based on a filter string Notes: ------------------------------------------------------------------------------*/ @openapi.openedge.export(type="REST", useReturnValue="false", writeDataSetBeforeImage="false"). @progress.service.resourceMapping(type="REST", operation="read", URI="?filter=~{filter~}", alias="", mediaType="application/json"). @openapi.openedge.method.property (name="mappingType", value="JFP"). @openapi.openedge.method.property (name="capabilities", value="ablFilter,top,skip,id,orderBy"). METHOD PUBLIC VOID ReadProd( INPUT filter AS CHARACTER, OUTPUT DATASET dsprod): /*Filter = REPLACE(filter,'?filter=','').*/ MESSAGE 'Filter: ' filter VIEW-AS ALERT-BOX. IF filter BEGINS "~{" THEN THIS-OBJECT:JFPFillMethod (INPUT filter). ELSE DO: BUFFER ttProd:HANDLE:BATCH-SIZE = 0. BUFFER ttProd:SET-CALLBACK ("AFTER-ROW-FILL", "AddIdField"). SUPER:ReadData(filter). END. END METHOD.

Continue reading...
 
Status
Not open for further replies.
Back
Top