SharePoint List Lookup Column - Editing data in a Lookup Column Cell

%3CLINGO-SUB%20id%3D%22lingo-sub-2988281%22%20slang%3D%22en-US%22%3ESharePoint%20List%20Lookup%20Column%20-%20Editing%20data%20in%20a%20Lookup%20Column%20Cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2988281%22%20slang%3D%22en-US%22%3E%3CP%3E%3CEM%3E%3CSTRONG%3EGiven%3A%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3EA%20SharePoint%20List%20(SPL)%20called%20Contractors%20with%20the%20following%20columns%3A%3CBR%20%2F%3EContractorID%26nbsp%3B%2F%2F%20Display%20name%20of%20the%20default%20ID%20column%3CBR%20%2F%3EContractorName%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnother%20SPL%20called%20Reports%20with%20the%20following%20columns%3A%3CBR%20%2F%3EReportID%20%2F%2F%20Display%20name%20of%20the%20default%20ID%20column%3CBR%20%2F%3EReportNumber%3CBR%20%2F%3EContractorID%20%2F%2F%20Lookup%20column%20referring%20to%20the%20ContractorID%20column%20of%20the%20Contractors%20SPL%3C%2FP%3E%3CP%3E%2F%2F%20Additional%20field(column)%20included%20when%20creating%20the%20Lookup%20column%20Contractor_ID%3C%2FP%3E%3CP%3EContractorID%3AContractorName%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EList%20View%20Editing%20of%20a%20Record%3C%2FP%3E%3CP%3EEditing%20the%20Report%20SPL%20in%20List%20View%20(a%20simple%20form%20of%20each%20editable%20field%20displays%20on%20the%20right)%3A%3C%2FP%3E%3CP%3EI%20see%20the%20following%20for%20the%20ContractorID%20field%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%3A%3C%2FP%3E%3CP%3EDouble%20clicking%20a%20record%20will%20open%20the%20%22edit%20form%22%20and%20show%20the%20following%3A%3C%2FP%3E%3CP%3EIf%20data%20already%20exists%2C%20see%20below%2C%20otherwise%20it%20shows%20%22---%22%20(or%20something%20like%20this)%3C%2FP%3E%3CP%3EContractorID%3C%2FP%3E%3CP%3E%5Bobject%20Object%5D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EClicking%20%22Edit%22%20in%20the%20menu%20above%20the%20SP%20List%20shows%20a%20similar%20form%2C%20however%2C%20if%20there%20is%20data%2C%20that%3C%2FP%3E%3CP%3Edata%20is%20displayed%20(say%2C%20an%20ID%20number)%2C%20if%20no%20data%20exists%20it%20displays%3A%20%22Select%20an%20option%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20some%20subtle%20nuance%20differences%20on%20which%20way%20I%20edit...%3C%2FP%3E%3CP%3EWhen%20I%20click%20in%20the%20field%20to%20edit%2C%20a%20listbox%20displays%20showing%20the%20referenced%20(looked-up)%20ContractorID's%3C%2FP%3E%3CP%3Efrom%20the%20Contractor%20SP%20List%20below%20the%20textbox%20which%20has%3A%20%22Select%20an%20option%22%3C%2FP%3E%3CP%3EI%20can%20click%20a%20choice%20in%20the%20listbox%20as%20usual.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3E%3CSTRONG%3EBut%2C%20because%20the%20listbox%20items%20are%20ID's%20I%20don't%20know%20which%20Contractor%20I'm%20selecting.%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3EEditing%20the%26nbsp%3BContractorID%3AContractorName%20lookup%20field(column)%20is%20not%20an%20option%20nor%20seen%20in%20the%20Edit%20Form.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGrid%20View%20Editing%20of%20a%20Record%3C%2FP%3E%3CP%3EIf%20I%20use%20%22Edit%20in%20grid%20view%22%20I%20can%20edit%20the%20cell%20directly%20in%20the%20grid.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EContractorID%20cell%20is%20editable%20similar%20to%20list%20view%2C%20with%20a%20listbox%20appearing%2C%20containing%20the%20IDs%20from%20the%20Contractors%20SP%20List.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EContractorID%3AContractorName%20lookup%20field%20is%20seen%20but%20this%20message%20pops%20up%20when%20clicking%20the%20cell%3A%3C%2FP%3E%3CP%3E%22This%20cell%20is%20read-only%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20a%20ContractorID%20is%20selected%20from%20the%20listbox%20the%26nbsp%3BContractorID%3AContractorName%20lookup%20updates%20automatically.%3C%2FP%3E%3CP%3EGrid%20view%20edits%20are%20quirky%2C%20but%20work%20well%20enough.%3C%2FP%3E%3CP%3E%3CEM%3E%3CSTRONG%3EBut%20still%2C%20because%20the%20listbox%20items%20are%20ID's%20I%20don't%20know%20which%20Contractor%20I'm%20selecting.%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3E%3CSTRONG%3EQuestion%3A%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3EFor%20the%20purposes%20of%20editing%20SPL%20records%20using%20the%20standard%20interface%20as%20described%20above....%3C%2FP%3E%3CP%3ECan%20some%20kind%20of%20column%20formatting%20(JSON)%20or%20setting%20allow%20the%20listbox%20to%20reference%20the%20readable%20Contractor%20Name%2C%20while%20storing%20the%20Contractor%20ID%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20experience%20is%20from%20decades%20in%20the%20database%20desktop%20development%20world%20and%20tables%20with%20lookup%20fields%20are%20an%20important%20tool%20for%20storing%20short%2Fsuccinct%20%22foreign%20key'%20primary%20ID's%20from%20the%20Lookup%20table%2C%20while%20having%20the%20ability%20to%20show%20the%20Admin%2FUser%20the%20readable%20field%20without%20storing%20the%20readable%20data%2C%20which%20could%20be%20very%20lengthy%20and%20take%20up%20much%20space%20in%20all%20tables%20that%20reference%20the%20Lookup%20table.%3CBR%20%2F%3EStoring%20an%20ID%20while%20displaying%20and%20allowing%20the%20user%20to%20update%20the%20record%20field%20(via%20a%20combo%2Fdropdown)%26nbsp%3B%3CBR%20%2F%3Efrom%20seeing%20the%20readable%20lookup%20choices%20is%20very%20useful%20for%20maintaining%20data%20integrity.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20Advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2988281%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eapp%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUsage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Given:
A SharePoint List (SPL) called Contractors with the following columns:
ContractorID // Display name of the default ID column
ContractorName

 

Another SPL called Reports with the following columns:
ReportID // Display name of the default ID column
ReportNumber
ContractorID // Lookup column referring to the ContractorID column of the Contractors SPL

// Additional field(column) included when creating the Lookup column Contractor_ID

ContractorID:ContractorName

 

List View Editing of a Record

Editing the Report SPL in List View (a simple form of each editable field displays on the right):

I see the following for the ContractorID field:

 

Note:

Double clicking a record will open the "edit form" and show the following:

If data already exists, see below, otherwise it shows "---" (or something like this)

ContractorID

[object Object]

 

Clicking "Edit" in the menu above the SP List shows a similar form, however, if there is data, that

data is displayed (say, an ID number), if no data exists it displays: "Select an option"

 

With some subtle nuance differences on which way I edit...

When I click in the field to edit, a listbox displays showing the referenced (looked-up) ContractorID's

from the Contractor SP List below the textbox which has: "Select an option"

I can click a choice in the listbox as usual. 

But, because the listbox items are ID's I don't know which Contractor I'm selecting.

Editing the ContractorID:ContractorName lookup field(column) is not an option nor seen in the Edit Form.

 

Grid View Editing of a Record

If I use "Edit in grid view" I can edit the cell directly in the grid.

 

ContractorID cell is editable similar to list view, with a listbox appearing, containing the IDs from the Contractors SP List.

 

ContractorID:ContractorName lookup field is seen but this message pops up when clicking the cell:

"This cell is read-only"

 

When a ContractorID is selected from the listbox the ContractorID:ContractorName lookup updates automatically.

Grid view edits are quirky, but work well enough.

But still, because the listbox items are ID's I don't know which Contractor I'm selecting.

 

Question:

For the purposes of editing SPL records using the standard interface as described above....

Can some kind of column formatting (JSON) or setting allow the listbox to reference the readable Contractor Name, while storing the Contractor ID?

 

My experience is from decades in the database desktop development world and tables with lookup fields are an important tool for storing short/succinct "foreign key' primary ID's from the Lookup table, while having the ability to show the Admin/User the readable field without storing the readable data, which could be very lengthy and take up much space in all tables that reference the Lookup table.
Storing an ID while displaying and allowing the user to update the record field (via a combo/dropdown) 
from seeing the readable lookup choices is very useful for maintaining data integrity.

 

Thanks in Advance

0 Replies