Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hi,
I wanted to use the data filter widget but am not able to get the exact out. This is the service i wrote for filtering.
var query =
{
"filters": {
"type": "And",
"filters": [
{
"type": "Matches",
"fieldName": "ParameterVal",
"value": "*"
},
{
"type": "Matches",
"fieldName": "AlarmCategory",
"value": "*"
}
]
}
};
var params = {
ValueQuery: Query /* STRING */,
CategoryQuery: Query /* STRING */
};
// result: INFOTABLE dataShape: DataFilterTesting_DS
var result = Things["TestingThing"].DataFilterTesting(params);
DataFilterTesting is another query which has (select * from AlarmType where AlarmCategory = [[CategoryQuery]] or ParameterVal = [[ValueQuery]])
How am I suppose to proceed? Please provide some help.
Thanks,
Shalini V.
Solved! Go to Solution.
You are combining TW standard Query parameters with SQL services, and it's now how it works.
If you are using standard TW query features, you have to relay on Query services like:
On thouse services you will be able to use the query like parameters you wrote.
If you are connecting to a custom database then you can't use the previous query services and format and you should use the standard SQL query formating for the given database on SQL services.
Hi @svisveswaraiya.
Can you show us DataFilterTesting? Also, you indicated you were not able to get the exact output with the data filter widget. What output are you expecting?
When you run this, are you actually using wildcards or is that just an example?
Please provide further details and we will try to assist.
Regards.
--Sharon
You are combining TW standard Query parameters with SQL services, and it's now how it works.
If you are using standard TW query features, you have to relay on Query services like:
On thouse services you will be able to use the query like parameters you wrote.
If you are connecting to a custom database then you can't use the previous query services and format and you should use the standard SQL query formating for the given database on SQL services.
If the solution provided by @CarlesColl answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.
Regards.
--Sharon