Monday, January 16, 2012 2:00 PM
I'm customising a EditForm for a list as I need to filter the options shown to the user using a SQL query (from SLAM tables). One field is a lookup field to another Sharepoint list.
I have copied the original EditForm, renamed it and deleted the original web part. I inserted a Custom List Form and removed the auto created dropdownlist. I added my SQL data control and Sharepoint DDL and linked the two. So far so go.
My SQL query is returning two fields, ID and Description. ID is the relative list item ID in Sharepoint which I associate with the DataValueField of the DDL. Description is linked to the DataTextField.
When I enter the form parameter into the SelectedValue property of the DDL, it does not work when the form loads. This is because it is looking for the ID value of the parameter. How can I get/set this in Sharepoint?
- Edited by Tippers Monday, January 16, 2012 2:03 PM
Tuesday, January 17, 2012 7:09 AMModerator
Thank you for your post.
I'm trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
TechNet Community Support
Wednesday, January 25, 2012 12:41 PM
Thanks for your reply. Have you been able to find anyone who might be able to help with this please as I could do with some ideas on a fix.
Thursday, March 01, 2012 10:29 PMModerator
Thank you for your post, I apologize for the delay. One thing that I notice that could be causing issues with the list forms is that you are deleting the original list form web part from the edit form page. Best practices require that you set the original web part to hidden and place the custom list form below it.
I tested database dropdown functionality in my own environment by creating a simple SQL database and adding a SQL data source and data list dropdown. I was able to select the options successfully. I wanted to verify that when you mentioned SLAM tables in your initial post that you were referring to the codeplex solution referred to at http://slam.codeplex.com/ . I have not been able to test with this yet, so it could possibly be an issue related to it.
- Proposed As Answer by GreggPJ - MSFTModerator Wednesday, March 07, 2012 10:31 PM