===Selector Syntax=== The overall selector syntax is made up of the following.... ===Type Names=== //Undecorated// text (text with no leading symbols) is treated as a **type** name. For example, the selector **Pump** would return all assets with the //type// 'Pump'. ===Specific Asset=== The //hash// (#) symbol indicates that the text following is an **asset name or identifier**. For example, **#Main Water Pump** would search ARDI for an asset named //Main Water Pump//. This search also works with partial matches and will match with property values. ===Related Assets=== The '}' or '{' symbol requests the assets that are //related// to the current one. The symbol is followed by a relationship name. The '}' symbol returns **downstream** assets, while the '{' symbol returns **upstream** assets. For example, **#Main Site}Location** will list all of the assets that are immediately inside the Location relationship of the asset called Main Site. You can change the behaviour of this selector with additional symbols... ^Symbol^Meaning^ |}/{|Each additional symbol looks one layer deeper| |+|This selector is //inclusive// (it includes the parent asset)| |*|Include **all** children| |?|Order doesn't matter (improves speed)| Using these, the selector **#Main Pump}*+Water** will show you ALL of the assets down-stream from the main pump, in the order of the relationship and will include the pump itself in the results. The selector **#Site}}Location** will return all assets inside the 'Site', then all assets inside //those// assets. You can add both upstream and downstream symbols in the same expression if you'd like to select assets in both directions. For example, **#Machine 8{{}}Sequence** will get the closest four neighbours in a straight-line relationship - two from upstream and two from downstream. ===Attachment=== The '~' symbol is followed by a relationship name and will select **all** assets that have that relationship. For example, **~Instrument Air** will select every asset that either provides or receives instrument air. ===Relationship Root=== The '/' symbol is followed by a relationship name, and will select the **root** assets that have the relationship. For example, **~Instrument Air** will select every asset that is a //parent// on the Instrument Air relationship, but is not a child. ===Property=== The '.' symbol is followed by a property name and will select all of the assets that have a particular property. This can be used as an //initial// selector, or can be used to refine results. For example, the selector **.Temperature** will return every asset that has a temperature across the entire site, while **Pump.Temperature** will return only //pumps// that have a temperature value. ===Filter=== The ':' symbol is followed by the name of a filter. It filters your results by an //attribute// that the asset might have. Attributes include... ^Name^Meaning^ |parent|The asset has children in the Location relationship| |leaf|The asset has no children in the Location relationship| |alert|The asset has at least one active alert| |active|The asset has at least one property linked to external data| The selector **#Server Room}*Location:alert** will return a list of any items inside the server room that have an active alert. ===Condition=== Square brackets ([ and ]) include a //condition// you can use to further filter your selection. The expression should include... 1) A property name, \\ 2) A comparison function (ie. '=', '>', '<') \\ 3) A value to compare against. For example, **Pump[Temperature>85]** will return a list of pumps who have a current temperature greater than 85 degrees. ------ ===Escaping Symbols=== If you ever need one of the symbols above as part of your query, you can //escape// them with the backslash (\) character. For example, **#Motor \#1** will search for an asset named 'Motor #1'.