Fundamentals > Working with the Model > Search Tool > Data Sharing Features > Tip: Cases for Saving Queries to a Feature
  
Tip: Cases for Saving Queries to a Feature
You must rerun a query if you have edited the query in the collector or if you have redefined the publish geometry or copy geometry feature. To do this right-click the publish geometry or copy geometry feature on the Model Tree and click Update Query on the shortcut menu. You can use the Update Query command only for one feature, or one query at a time.
A collector can contain manually collected items as well as items that are the result of a saved query. You can edit a saved query from a collector by selecting the query, opening the search tool by right-clicking the query, and clicking Edit on the shortcut menu.
When you redefine a feature after saving a query in the Surface Sets collector or the Chain collector, and one or more references listed earlier by the query no longer exist, then consider the following points:
If the saved query does not show any results, the collector displays a yellow dot adjacent to the query name. In this case, you should redefine or delete the query.
If the query contains at least one reference or an alternative reference, a yellow dot is displayed adjacent to the query name in the collector. If a query has a missing reference, it is indicated in the Copied Refs column of the Model Tree.
If a collector with an empty query is the only collector with items and the copy geometry or publish geometry feature has no references, a red dot is displayed with the feature and the feature fails on regeneration.
 
You can view the error message showing the reason for the yellow or red dot by right-clicking the query in the Detail collector and clicking What’s Wrong.
A query with a yellow dot indicates that the feature will not fail regeneration but the query should be updated. The behavior is the same for the surface collector as well as the chain collector.
You can copy and paste a data sharing feature like copy geometry or publish geometry feature with stored queries in other model. You can also use such data sharing features in a UDF. Copying such feature also copies the queries saved within the feature. The feature may fail regeneration for missing references if the copied queries do not contain the specified references. For example, if the saved query searches for a specific feature ID and the feature does not contain the required feature ID, the regeneration fails for the missing feature ID. If you click Edit > Paste Special to copy a feature to other model, you are prompted to select an alternate scope model in the Advanced reference configuration dialog box. On selecting the alternate scope model, the Look in value of the saved query is automatically updated.
If you are editing references for a copy geometry feature with saved queries, you are prompted to select an alternate scope model. On selecting the alternate scope model, the Look in value of the saved query is automatically updated.
A query can have parent entities. However, these items are not treated as references. For example, if you are searching for all surfaces with a specific surface finish value, and these are the children of an annotation feature, then the result of this query shows the corresponding surfaces. In this case, the publish geometry feature does not fail if the annotation feature is missing. The annotation feature is considered as a parent entity of the query, but it is not stored as a reference. You must update the query to evaluate the effect of the missing annotation feature on the saved query.