Wappler 3.0.0, osx Catalina 10.15.5, NodeJS
Used to be working and no idea what happened
Trying to return all entries if type_filter is not selected (ie. passing -1)
ccu_filter works fine but is disabled atm.
Works and returns filtered data : ccu_filter=&type_filter=3
This returns nothing, but no error in console og db complaints : ccu_filter=&type_filter=-1
When checking the Server Data bindings there seems to be something going on.
Have seen -1 beeing switched to +1 in some cases
The filter value is shown in Design as:
In code view:
Or maybe it’s just a simple mistake at my end…
"wheres": {
"condition": "AND",
"rules": [
{
"id": "ccu.c_ccu_type_id",
"field": "ccu.c_ccu_type_id",
"type": "string",
"operator": "equal",
"value": "{{$_GET.type_filter}}",
"data": {
"table": "ccu",
"column": "c_ccu_type_id",
"type": "text"
},
"operation": "="
}
],
"conditional": "{{$_GET.type_filter != -1}}",
"valid": true
},
"orders": [
{
"table": "ccu",
"column": "c_tag",
"direction": "ASC",
"recid": 1
}
],
"query": "SELECT ccu.c_id, ccu.c_tag, ccu.c_active, ccu.c_ccu_type_id, t.ct_name\nFROM ccu\nLEFT JOIN ccu_type AS t ON (t.ct_id = ccu.c_ccu_type_id)\nWHERE ccu.c_ccu_type_id = :P1 /* {{$_GET.type_filter}} */\nORDER BY ccu.c_tag ASC",
"params": [
{
"operator": "equal",
"type": "expression",
"name": ":P1",
"value": "{{$_GET.type_filter}}"
}
]