Hello Fibery Community,
I’m encountering an issue when trying to query entities based on their workflow state using the Fibery API. I’ve set up a workflow with several states for my “Buchhaltung/Beleg” entity type, including a state named “Freigegeben zum Datentransfer”.
When I try to query for entities with this workflow state using the following API call:
{
"command": "fibery.entity/query",
"args": {
"query": {
"q/from": "Buchhaltung/Beleg",
"q/where": ["=", ["workflow/state", "enum/name"], "Freigegeben zum Datentransfer"],
"q/limit": 10,
"q/select": [
"fibery/id",
"Buchhaltung/Dateiname",
// other fields...
"workflow/state"
]
}
}
}
I receive the following error:
{
"success": false,
"result": {
"name": "entity.error/schema-field-not-found",
"message": "\"Freigegeben zum Datentransfer\" field was not found in \"Buchhaltung/Beleg\" database.",
"data": [Object]
}
}
What’s confusing is that I can verify this workflow state exists in my Fibery database. When I query for all workflow states, I get:
[
{
"fibery/id": "6788bc80-147c-11f0-a690-9d116968b0ba",
"enum/name": "Neuer Beleg"
},
{
"fibery/id": "6788bc81-147c-11f0-a690-9d116968b0ba",
"enum/name": "Freigegeben zum Datentransfer"
},
// other states...
]
What is the correct way to query entities by their workflow state name using the Fibery API? Am I missing something in my query structure?
Thank you for your help!