Undertaking an email list Matchmaking
A research industry try illustrated of Greensboro escort the an example of the fresh new SPFieldLookup class. The class comes with constructors, although proper way to manufacture a lookup job will be to call the AddLookup style of the new SPFieldCollection classification. The fresh new AddLookup means enjoys an overburden that enables one to would a browse so you can an inventory into the a new web site on web site your location doing the lookup.
You may make a love ranging from listing in numerous websites, however you cannot put a limiting behavior on the dating. SharePoint Base does not impose referential ethics on get across-net lookups.
Label the latest AddLookup form of the fresh SPFieldCollection object, passageway this new ID of your own research number (the information and knowledge source) in the next parameter.
Rating a reference to the SPFieldLookup target you to stands for the latest occupation by the contacting the fresh new GetFieldByInternalName means, passage the brand new sequence that is returned by AddLookup method due to the fact a disagreement.
Set new LookupField assets with the internal identity of one’s field from the search list your SPFieldLookup object should explore since the databases.
Concurrently, the target is going to be type SPFieldCalculated if your returns is actually text message. For more information, understand the OutputType assets. The target will likely be types of SPFieldComputed if looks try let for the field. To learn more, see the EnableLookup assets.
(Optional) If you are planning in order to specify a deletion behavior besides Nothing (the default), put the fresh new Listed property to genuine.
The consumer need ManageLists consent on search list in acquisition so you’re able to identify either Cascade otherwise Limitation. To learn more, understand the SPBasePermissions enumeration.
This may can be found in the event the browse field’s RelationshipDeleteBehavior possessions was once set to Nothing and you will some body deleted the object to the target checklist the lookup job factors to. The new search profession is therefore orphaned ; it contains an incorrect really worth. A romance conclusion cannot be implemented in case your record include orphaned browse fields.
Contrast the significance that is came back by list’s ItemCount property towards the worthy of that’s came back by websites application’s MaxItemsPerThrottledOperation assets.
Analogy
The second example is actually an unit app that induce a romance between your Customers checklist and also the Pending Commands record. The application form calls new AddLookup method of create a research industry named Buyers ID to your Pending Orders listing and you will issues the newest community in the ID community with the People number. Brand new Buyers ID job was indexed and place in order to limit deletions on browse record.
Creating Numerous-Column Hunt
Inside SharePoint Basis 2010, you possibly can make multiple-line hunt to the same lookup number. Such as for example, suppose you have two lists, People and you may Pending Sales. You create a love amongst the directories adding a customers ID column on Pending Requests list and you may section this new line within ID field throughout the Customers record. When you look at contents of brand new Pending Purchases checklist, you want to get a hold of important information concerning consumer who set the order in addition to guidance that relates to your order itself. To eliminate this dilemma, you decide one in addition to the no. 1 search line, Consumer ID, you are going to create around three second research columns to display the fresh owner’s first name, past term, and contact number.
Secondary articles in the a simultaneous-line lookup believe an important column because of their relationship to the newest look list. You can’t introduce a deletion constraint into the a holiday research column. The latest restriction which is in for the main line ‘s the just one that is placed on new browse checklist.
The process having creating a vacation research line is virtually identical on the one to to possess undertaking a first search line. An important differences is you create the occupation by contacting this new AddDependentLookup style of new SPFieldCollection category rather than the AddLookup strategy. The latest AddDependentLookup strategy possess a few variables: the latest display screen term for this new additional field, and the ID of your number 1 job.
Lascia un Commento
Vuoi partecipare alla discussione?Fornisci il tuo contributo!