I am using SSIS (2008R2) to insert data into a SharePoint 2010 list. The problem I am having is that the combo box selections are inserted as text values (not the appropriate selection) and are not available on a subsequent extract. They also immediately revert to the first list item if a user edits the list item. How do I insert data and make the appropriate value selection from the combo-box values?
Ok. Figured this one out with a little trial and error.
The combo-box/"multi-select choice" stores as plain text.
In order to programatically insert with SSIS set the default value of the choice to calculation and leave it empty.
It is important to note that these items are not set to restrict to list.
Simply changing the default value to an empty calculation instead of "choice" (which defaults to the first list item) allowed me to insert plain text values and have them store properly.
Related
Here is an image of it. I want the default value to be Open when the toggle is selected as yes.
Change the Default setting for the dropdown control to a formula along these lines:
If(MyToggle.Value=true,"Three","One")
If the control is a Combobox, which is what's used for a SharePoint Choice column, then the items are records, not just a list of text. For a combo box you need to change the property for "DefaultSelectedItems" and set it to something like this:
If(MyToggle.Value,{Value:"Three"},Parent.Default)
Make sure that the value you are using is a valid one according to the SharePoint choice column definition.
I have a user form with a combo box with two columns. How do I refer to the values that are active in the combo box within VBA script on other parts of the user form (buttons, etc)?
Simply using MyComboBox.Value yields the value in the first column. I can't figure out how to refer to the second column.
EDIT: Based on advice below, I used this:
MyComboBox.List(MyComboBox.ListIndex, 1)
You don't.
The Value of a multi-column ComboBox will be the "key" value. You've presumably populated the dropdown from some list or array: use that same source to lookup the value corresponding to the selected key. Note the key/value wording: having the values in a Dictionary makes it very easy to retrieve the value of the second column.
Or, look it up from the control's List (which is essentially a copy of your items source), using the ListIndex, which gives you the index of the selected item in the source list.
You can have a Property Get procedure responsible for this lookup - then other parts of the code can easily consume it as needed.
Private Property Get SelectedItemDisplayText() As String
SelectedItemDisplayText = MyComboBox.List(MyComboBox.ListIndex, 1)
End Property
Normally you only care for the selected "key" (/"ID"), not the "display value" though.
When viewing a PowerPivot workbook natively all is well. However when I save it to Sharepoint and view it via a browser, I find that the option to filter data by typing in a value is no longer present. (All there is is an extremely LONG list of values which must be scrolled through and checked.) Being able to type in a value to search on is rather crucial feature when one wants to filter on a row where there may be thousands (or more) distinct values. Using a slicer or the standard filter drop-down in this case is pretty unworkable! Is there no way around this?
Finally found a co-worker who could answer this question -- it was "hidden in plain sight". Instead of selecting 'Filter...' from a column header drop-down, select 'Label Filters' (used for text values) and then 'Begins with' from the secondary pop-up menu, and then you can type in the beginning of the string you are searching for. Silly me I thought 'Label Filters' had something to do with Labels, not text values.
There is absolutely nothing about this anywhere. So Just as well start one.
How can you select or get the selected index of a drop box (without code at the back) in infopath
The field that the dropbox is bound to will contain the value of the item that is selected. to change the item that is selected, change the value of the field.
There are explanations for this all over the web, but none I have followed a) seem to work, b) explain how to achieve this in simple noob terms, c) show any sort of diagram, or d) make assumptions that you want to start jumping right into code...
I have a form for users to log training they have completed. I have a sharepoint list with the course name and the duration in hours.
When the user opens the infopath form, it populates a read-only field with their username, and populates a dropdown with the list of available training courses from my sharepoint list.
All I want to do is to populate another read-only field with the duration of the course... But I just cant find the right filter settings to do it.
Currently I have the default value of the duration field in my form set to the formula:
Duration(from SP list)[Course Title (from SP list) = Training Course (from form lookup field)]
But this is not returning any values...
This is using both SP 2010 and IP 2010
Ok, you use rules, not the default value, as pretty much every website I have looked for answer tells you...
Make sure the default value for the field you want to populate is blank, and then set a rule that when your lookup field value changes, it updates the value in your other field...
That was easier than I thought!
This is soemthing called a cascated drop down there are various examples of this on the web.
To do this you need to click on the drop down box that you want to filter.
This will be the duration. (The user would then select the course they went on)
In the duration drop down below you would ensure that you have connected it the correct data source.
Right click on the duraction drop down.
Drop down list properties
get choices from external data source
on the entries you would select the button to the right hand side
You would select 'course title now as this is what you want it to be filtered by' (drop down above)
When selected you would click filter data - (button on bottom right hand side)
You would then filter it so the formula is 'CourseTitle(above drop down) 'is equal to' CourseTitle(data source from the list)'
This then should only allow them to match select the time that matches that course.
If this doesnt work let me know.