43429members
217967posts

[Imported] Creation of a SQL filter button

Highlighted
Sisko

[Imported] Creation of a SQL filter button

>>Message imported from previous forum - Category:ClearSCADA Software<<
User: KylePaynter123, originally posted: 2019-09-18 16:29:58 Id:518
Good Day guys,

I'm trying to create a button to filter a SQL query for example

I have a query that shows all alarms for Loss of power, but I want to add a filter button to search description of the location.


thanks guys

1 REPLY 1
Highlighted
Sisko

Re: [Imported] Creation of a SQL filter button

>>Responses imported from previous forum


Reply From User: BevanWeiss, posted: 2019-09-18 21:45:32
There are two main ways to do this:
1) Have the SQL query as an animation
2) Use scripting to change the SQL query

My recommendation is option 1.
You would likely want to look into the REGISTRY() animation method, and then you can use Pick Actions on the buttons to set appropriate entries in the Registry which then influence the SQL query... simples... 😉


Reply From User: du5tin, posted: 2019-09-27 14:00:45
+1 for Bevan's note. We use option 1 all the time. It is robust and fast. Option 2 is prone to breakage on object renames, depending on how you put your script together.