To provide a look line to help you an inventory

To provide a look line to help you an inventory

Undertaking an email list Relationships

A search community was portrayed by the an illustration of the latest SPFieldLookup group. The class is sold with constructors, however the simplest way to create a search career will be to name this new AddLookup types of the fresh new SPFieldCollection group. Brand new AddLookup method enjoys an excess that enables you to manage a look so you can a list inside a special web site in the website your location undertaking the fresh browse.

You possibly can make a romance ranging from listing in almost any websites, nevertheless cannot set a restrictive decisions on dating. SharePoint Basis cannot impose referential ethics into the get across-web searches.

Telephone call the newest AddLookup kind of the SPFieldCollection object, passing the ID of browse number (the content supply) on second factor.

Score a mention of the SPFieldLookup target you to definitely represents the newest industry from the calling the newest GetFieldByInternalName method, passage this new string which is came back by the AddLookup strategy just like the a disagreement.

Set this new LookupField property toward interior title of your job on lookup number the SPFieldLookup object is use as their data source.

Likewise, the mark might be variety of SPFieldCalculated if your production are text. To find out more, comprehend the OutputType assets. The mark are types of SPFieldComputed if queries was let having the field. For more information, comprehend the EnableLookup assets.

(Optional) If you are planning in order to identify a removal behavior other than Not one (the newest default), put the new Noted assets so you can true.

An individual should have ManageLists consent to the research listing into the purchase to help you establish sometimes Cascade otherwise Limit. https://datingranking.net/escort-directory/costa-mesa/ To find out more, comprehend the SPBasePermissions enumeration.

This may are present if your look field’s RelationshipDeleteBehavior possessions had previously been set to Not one and anybody erased the item for the address checklist that look industry points to. The new browse job try hence orphaned ; it includes an incorrect well worth. A romance behavior can’t be enforced in the event the list includes orphaned research areas.

Examine the value that is returned by the list’s ItemCount possessions for the really worth that’s came back from the websites application’s MaxItemsPerThrottledOperation possessions.

Analogy

The next example is actually a console app that induce a relationship within People record plus the Pending Sales list. The application form calls brand new AddLookup method of add a look profession named Buyers ID on the Pending Requests record and circumstances the new community at the ID occupation toward Users checklist. The new Customer ID occupation was noted and put in order to maximum deletions on the look record.

Starting Numerous-Column Hunt

In the SharePoint Basis 2010, you possibly can make several-line looks for the exact same research listing. Such, suppose that you really have one or two lists, People and you may Pending Orders. You create a love amongst the lists with the addition of a consumer ID column to your Pending Commands record and you may point the new column from the ID industry on the People record. After you view items in brand new Pending Instructions checklist, we need to get a hold of information towards customer just who placed the order including information that relates to your order in itself. To resolve this issue, you’ve decided you to definitely and the number one browse column, Consumer ID, you will create around three secondary research columns to demonstrate the customer’s first-name, history identity, and you will phone number.

Supplementary articles during the a multiple-line lookup rely on the primary line for their relationship to this new lookup checklist. You can’t establish a removal constraint towards a holiday browse line. This new restriction that’s set for an important line ‘s the singular that is put on new search list.

The procedure having performing a holiday browse line is close to the same towards the one to to have doing a first research line. The main huge difference is that you produce the profession of the contacting brand new AddDependentLookup sort of the latest SPFieldCollection class as opposed to the AddLookup method. Brand new AddDependentLookup means has actually several parameters: this new display title to use for the latest supplementary profession, and the ID of one’s top job.

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *