Set the value of Infopath field from aspnet dropdown list control in sharepoint 2010 site
I am developing a helpdesk system on sharepoint 2010 for our facility management dept., through which the call agent can log the client's complain through tickets. I have created 3 dropdown lists (asp.net controls from sharepoint designer) in the helpdesk page, reading repectively from our database the "projects", "properties" and "units", and the call agent will select the appropriate choice accroding to the client.
I have created a custom list, it is the helpdesk tickets, and edited its layout in infopath 2010.
I am displaying that list on the same page, but filtered according to the selected unit from the "units" dropdown list, to display the tickets history for that particular unit.
What I need is to set the default value for the "unit" field in the new ticket after the 开发者_JS百科call agent clicks "add new item", to be the value selected in the "units" dropdown list.
I have tried a workaround, by removing those 3 controls and creating a new custom list and called it "engine", and edited its form to have the 3 dropdowns, then adding it as a data source for the ticket form, and displaying the "engine" form on the page.
The value of the unit was passed succesfully, but of course I have to click "save" after I enter the choices for the three dropdowns in that "engine" form for the value to be saved and passed to the "new ticket" form. also it was so much slower and the history filter was not working.
So I need to return to the first solution and keep the 3 asp.net dropdowns, and pass the sleected value of the "units" dropdown to teh "unit" field in the ticket form.
Thank you all in advance :)
I don't think it's possible to inject values into an IP Form. However, consider this workaround:
You create the "projects, "properties" and "units" dropdown's within InfoPath and then map this properties to the SharePoint list. This way, you can still apply SharePoint's default filter/group by/etc behaviour and you actually don't need to code anything yourself :-)
精彩评论