MOSS 2007 List
I have a list with the folowing values 1-Excellent 2- OK 3-Bad On another list I have a lookup value to the above list. When the user selects a value say for eg. One I need to store the Value 1 and not the Excellent data. Is there any way to do that? Thanks
January 31st, 2011 11:21am

Hi kosu1969, You can use an event receiver and override the itemadding/itemupdating events and update the values before saving. This will give you more control For info on how to use event receiver refer the following links http://blog.sharedove.com/adisjugo/index.php/2009/03/12/develop-and-deploy-a-sharepoint-event-receiver-from-the-scratch/ http://blah.winsmarts.com/2006-7-Sharepoint_2007__List_Events_Practical_Example__Creating_a_rigged_survey.aspx http://www.c-sharpcorner.com/UploadFile/Chandresh.P/EventHandler04292009070324AM/EventHandler.aspxMy SharePoint Blog http://dhireny.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
January 31st, 2011 11:57am

Please clarify your requirements in detail...w: http://www.worldofsharepoint.com | t: @sharesandip
January 31st, 2011 11:59am

I have a sharepoint document list containing these Columns Rating_ID and Rating_Desc. The data I have on these columns are : 1- Excellent 2- Good 3-Ok I have created another document list where the user needs to enter the values. One of the column I have on this list is a linked to the above master list. I need to create a form where by when the user selects Excellent from the dropdown, I need to add 1 to list and not the excellent value. I hope I am able to explain it.
Free Windows Admin Tool Kit Click here and download it now
January 31st, 2011 12:07pm

If you choose Rating_Desc as lookup column in second list then text value like "Excellent" will be saved as Item data so forget what you save, Text or Integer. Just think that when you want to access Rating_ID elsewhere you can use SharePoint object model and query on the list items based on Rating_Desc and fetch ID.w: http://www.worldofsharepoint.com | t: @sharesandip
January 31st, 2011 12:21pm

I had use that Rating_ID in some of the reports. That is why I wanted to save it as Rating_ID instead of Rating_Desc. Is there any way I can do that.
Free Windows Admin Tool Kit Click here and download it now
January 31st, 2011 2:20pm

Hi kosu1969 What kind of report are you creating? Can you access to SP object model ? Sorry, but your structure is not correct, you have two separate value lists (two not related columns), but you want to see them as linked to each other. That why now you have problems. Suggestions: 1. use only one column to list your statuses (for example "1-Excellent" as one value in a single field), and separate them in object model 2. use two selections in your form/report - one for ID, and one for it's description 3. Just use object model to get another column value of the item according to first value (you must be sure that it's unique, checking manually in code). __________________________________ Zorayr Zakaryan Lightning Tools
February 2nd, 2011 4:46am

Hi kosu1969 What kind of report are you creating? Can you access to SP object model ? Sorry, but your structure is not correct, you have two separate value lists (two not related columns), but you want to see them as linked to each other. That why now you have problems. Suggestions: 1. use only one column to list your statuses (for example "1-Excellent" as one value in a single field), and separate them in object model 2. use two selections in your form/report - one for ID, and one for it's description 3. Just use object model to get another column value of the item according to first value (you must be sure that it's unique, checking manually in code). __________________________________ Zorayr Zakaryan Lightning Tools
Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2011 4:46am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics