Set the value of Infopath field from aspnet dropdown list control in sharepoint 2010 site - sharepoint-2010

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 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 :-)

Related

restricting a combobox to list values and outdated list values

I am creating a program that for simplicity's sake records the name of a staff member that receives a phone call. This program is designed to show old entries along with creating new ones.
The problem is that I want a user to only be able to select a listed name from the drop box when creating a new entry. But this list will only show current employees. Yet, when viewing older calls this combobox field also needs to display former employees that took a call that may no longer be in this list.
As far as I can tell with the Microsoft control and properties there is only 2 options that relate to this matter.
DropDownStyle as DropDown or DropDownList.
When using DropDown the user can submit any name (which is not wanted).
With DropDownList the user can only submit names on the list, but when browsing through old entries any names that are no longer on that list will not appear on their respective calls (which is also not wanted).
I'm aware I could end up having to implement my own combobox class but I wanted to see if anyone knew of a more elegant fix that combined both of these functionalities. Thanks!
It seems to me you have two modes. Add mode adds a new call record, while view mode displays old records.
Use the drop down list to restrict the user to what you load. When in Add mode, load the control with only current employees. When the form is in view mode, load with all employees.
Use DropDown. In the Validating event, set e.Cancel = True and instruct an ErrorProvider control to put up a warning with its SetError method if SelectedItem Is Nothing, but clear the error (by passing Nothing to SetError) otherwise. Then, in the combo box's SelectionChangeCommitted event, call the form's Validate method.

SharePoint 2010 In-Browser Form User Info Changing after Submit

I have a In-Browser Form I published to SharePoint 2010 via Infopath and have a section in the beginning which pulls the current user data to get their Name, Email, Number, etc. The issue is once a user submits the form and I take a look with the In-Browser feature in SharePoint, the information changes to my info instead of the submitter. However, when I open in the form via Infopath application, it shows the originial submitters info. Is there a way or an option I'm not aware of which will fix this issue?
Found the answer. On the text boxes that pulls the user info, go to the Text Box Properties and under Default Value, deselect the checkbox "Refresh value when formula is recalculated".

Combo Box with multiple selections clicking ok

In access the multi combo box that I have requires me to click okay to add the selections to the box. Is there VB code to make it to where when you check beside the selections it automatically adds them to the box when you leave it?
If you are using SharePoint with this database, add the SharePoint tag to this post.
If you are NOT using SharePoint, my research indicates you should not use a multi-valued combo box.
Reference 1
Reference 2
Reference 3
Reference 4
It's one of the those features provided by Access that tries to offer a shortcut while undercutting good database design. The original classic is the Lookup Field.
If you still want to use this feature, VBA might let you smooth the user experience using
DoCmd.SetWarnings.False and (later) DoCmd.SetWarnings.True.

Add Data to Child List from Parent List form in SP 2010

I have 2 custom lists. Purchase Order (PO) and Purchase Order Items (POI). The POI list has a column PO ID, which is a lookup field to a column PO ID in the PO list. For every row in PO, there can be multiple rows in POI (one to many relationship).
When user tries to enter new items in the PO form, he needs to fill in the purchase items too, which will be stored in the POI list. The issue I am facing is, how do I allow the user to enter the data in both the lists at the same time, OOTB?
I have to do this using the list forms itself. Infopath is not an option available. SPD techniques are welcomed.
I don't believe this can be done OOTB or with SharePoint Designer. Out of the box, SharePoint only allows you to enter one new item to one list at a time.
Using Edit In Datasheet is as close as you can some to editing or entering multiple list items at once. But even in this case, it is limited to a single list.
I have done a project similar to what you described using custom programming. I created custom forms along with custom field types that required custom javascript on the client and event receivers on the server. It was an interesting project, but it required a lot of moving parts.

On publishing infopath 2010 form loses control properties - dropdown control data binding setting

I am try to created a cascade dropdown using infopath 2010 in sharepoint 2010 list. On publishing infopath form i lost data binding setting and it just resets to default "Enter choices manually". It works perfectly only if i dont publish it (preview mode). I even recreated infopath form many times but of no use. It works perfectly on some other site but not on where i want to.
[note: Dropdown are lookup columns]
Check your form settings at dropdown box properties > Browser forms > Post back settings, make sure its set to Always.