|Bookshelf Home | Contents | Index | PDF|
You can specify the [NOT] EXISTS operator in a QBE or Search Specification referring to a multi-value group field. A multi-value group field is the user interface mechanism for displaying the child records of a parent record within the parent record's applet. For example, assume the following:
Because the form applet is opportunity-focused, the opportunity name is a standard text box control, whereas the contact's first and last names are defined as multi-value group fields. The contact's first and last names are defined using multi-value group fields instead of standard edit controls, because the only way to display multiple contacts for an opportunity in an opportunity-focused applet is through a multi-value group field.
When you enter "Wine Festival" as a search specification in the opportunity name, you are asking the Opportunity business component to return all opportunities that have a name of "Wine Festival." When you enter "Smith" as a search specification in the contact last name, however, you are asking the Opportunity business component (not the Contact business component) to return all opportunities that have contacts with a last name of "Smith."
If you have an MVF with a primary ID field specified and the Use Primary Join attribute checked, then querying without EXISTS finds all the records where the primary record in the MVG matches that particular search spec.
If you specify EXISTS, then the result set consists of every record for which any of the records in the MVG match the search spec. If you do not specify a primary ID field for the MVG or set the Use Primary Join attribute to unchecked, then the only available query is one that uses EXISTS. In this case, if you specify a query that does not use EXISTS, then EXISTS is automatically assumed and inserted as part of the search spec.
For example, if you query on the Account Team with the value VSILVER (and the MVG has been configured to support a primary), then all records are returned for which VSILVER is the primary position on the team.
NOTE: In a view with sales team visibility, do not attempt to constrain the account team by using query by example. Use a view with All visibility. For example, you are logged in as SADMIN and you are on My Accounts view. When you now create a new query where a login name is entered for Account Team (for example, VSILVER), you cannot expect to receive all accounts where SADMIN is on the team and VSILVER is the primary.
|Siebel Developer's Reference|