I tried to test the value of a criteria with Velocity in a custom SQL tag:
I tried:
- Using ' or " or escaping with " or '
- Using $dsRequest.criteria
When I use the operator !=, it trigger the first if. So my guest is that the velocity variable have something in it, but not active/inactive.
I trace the fetch, who seem ok:
Anyone got some idea how we can do this?
Thank again for your time!
Code:
<operationBinding operationType="fetch"> <customSQL> (...) #if ($criteria.statut == 'Active' || $criteria.statut == 'Inactive') (some sql) #end (...) #if ($criteria.statut == 'Active') (some sql) #elseif ($criteria.statut == 'Inactive') (...) #end </customSQL> </operationBinding>
- Using ' or " or escaping with " or '
- Using $dsRequest.criteria
When I use the operator !=, it trigger the first if. So my guest is that the velocity variable have something in it, but not active/inactive.
I trace the fetch, who seem ok:
Code:
{ "actionURL":"http://127.0.0.1:8888/csmpapp/sc/IDACall", "showPrompt":true, "prompt":"Recherche des enregistrements correspondant à vos critères...", "transport":"xmlHttpRequest", "promptStyle":"dialog", "bypassCache":true, "data":{ "criteria":{ "operator":"and", "criteria":[ { "fieldName":"statut", "operator":"equals", "value":"Active" } ] }, "operationConfig":{ "dataSource":"recherche", "repo":null, "operationType":"fetch", "textMatchStyle":"exact" }, "componentId":"isc_ListGrid_0", "appID":"builtinApplication", "operation":"recherche_fetch", "oldValues":{ "operator":"and", "criteria":[ { "fieldName":"statut", "operator":"equals", "value":"Inactive" } ] } } }
Thank again for your time!
Comment