[Bug] Form - Data Scope: Request parameters spliced incorrectly when value is set to a JS variable defined in the event flow, causing API query failure
Author: muydCreated Sep 20, 2026Updated Sep 24, 2026
* Describe the bug
Form - Data Request Scope: When the query condition's ID value is set to a JS variable defined in the same block's event flow, the filter parameter in the query request data is spliced incorrectly, causing the API query to fail. The backend then throws an error when trying to cast the object to a bigint.
* Environment
- NocoBase version: v2.2.13
- Database type and version: postgis:16-3.5
- OS: Windows
- Deployment Methods: Docker
- Docker image version: registry.cn-shanghai.aliyuncs.com/nocobase/nocobase:latest-full
- NodeJS version:
* How To Reproduce
- Navigate to the mobile path
/v/mobile/xxxxxx - Create Block -> Form (Edit) -> Other Records -> XXX
- Form -> Edit Event Flow -> Add Event Flow -> Before Rendering -> Before All Event Flows -> Add Step -> Custom Variable -> JS Variable -> Set AA =
return '387675278082048'; - Form -> Data Loading Method -> Load all data when filter conditions are empty;
- Form -> Data Scope -> Add ID = AA (the JS variable defined above)
- See the error below
ResponseError: invalid input syntax for type bigint: "[object Object]"
at v.runAction (https://host:port/v/assets/index-6236da6f.js:1820:53680)
at async https://host:port/v/assets/index-6236da6f.js:1820:58715HTTP Request Parameter
filter=%7B%22$and%22:[%7B%22$and%22:[%7B%22id%22:%7B%22$eq%22:%7B%22success%22:true,%22value%22:%22387530817863680%22%7D%7D%7D]%7D]%7D&appends[]=f_dishes&page=1&pageSize=1HTTP Response
{
"errors": [
{
"message": "invalid input syntax for type bigint: \"[object Object]\""
}
]
}Expected behavior
The filter value in the request parameter is expected to be:
{"$and":[{"$and":[{"id":{"$eq":"387675278082048"}}]}]}
However, the actual current value is:
{"$and":[{"$and":[{"id":{"$eq":{"success":true,"value":"387675278082048"}}}]}]}
Screenshots
Logs
Source: nocobase/nocobase