osisoftpi-grafana icon indicating copy to clipboard operation
osisoftpi-grafana copied to clipboard

Feature request: Query and return elements based on attribute values

Open SC-66 opened this issue 2 years ago • 2 comments

It should be possible to query an AF structure with an attribute condition and only return the elements fulfilling the condition. For example: If I have an variable called Machines with a list of element names and an attribute named MachineStatus, then raw query today looks like this: PISERVER\DATABASE\AAA\BBB\CCC\${Machines};MachineStatus That query returns all elements of the variable list Machines and if I use Repeat by variable then the panel will be repeated for each item in the Machine list.

I want to be able to use the same variable list in the query but also include an attribute condition, something like this in raw format: PISERVER\DATABASE\AAA\BBB\CCC\${Machines};MachineStatus=3 That would then return all elements part of the Machines variable AND fulfilling the condition of having the attribute MachineStatus equal to 3.

SC-66 avatar Sep 01 '22 11:09 SC-66

Is this possible using PI Web API?

You can do this using transformation.

coderReview avatar Sep 02 '22 22:09 coderReview

I have not seen how it is possible using transformation? If I do it by filter out values, the panel itself will still remain on the dashboard "empty". I want the panel not to show at all if the element does not fulfill the criterina.

Den lör 3 sep. 2022 kl 00:02 skrev Paulo Vitor Magacho < @.***>:

Is this possible using PI Web API?

You can do this using transformation.

— Reply to this email directly, view it on GitHub https://github.com/GridProtectionAlliance/osisoftpi-grafana/issues/86#issuecomment-1235927323, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV6PVJZK2L7S3T5F3XTZU3LV4J2N5ANCNFSM6AAAAAAQCH7DNU . You are receiving this because you authored the thread.Message ID: @.***>

SC-66 avatar Sep 05 '22 05:09 SC-66

https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/transform-data/#filter-data-by-values

coderReview avatar Sep 19 '24 18:09 coderReview