How to validate field in InfoPath against separate SharePoint list - sharepoint-2010

I have two SharePoint Lists. One is a simply a list of items with a title and description, the other is a list of requests which contain a workflow. These requests are requests for adding or updating items in list A.
I want to validate the Title field on the add new item form for the Request List. I'm wanting to check that the Title does not already exist in List A.
I know can set the properties to only allow unique values on the Title for List A but as these request are going into a separate list I am not sure how I can check to see if the item already exists in List A.
I am creating the forms for the Request List in InfoPath.
Any ideas would be great.

This is a rough idea, but you could load in List B into your data form and set a textbox to the value of the list, filtered by the title field from list A. If the field is blank then you know it doesn't exist already.
This blog can help with the loading and filtering of the list data:
http://pravahaminfo.blogspot.com/2011/05/filtering-sharepoint-list-data-using.html

Related

Lookup column exceeds List View Threshold

I have created a list which contains records/list items more than the list view threshold which is 5000.
I have also created a site column (as lookup) which points to a column in this parent list.
I have added this site column to a library. And I uploaded a document. But when I edit the properties of the document, I could not update value for this lookup column. The error is showing as:
This is a lookup column that displays data from another list that currently exceeds the List View Threshold defined by the administrator (5000).”
So I have indexed this column in the parent list. from list settings -> indexed columns -> add a column
But still I'm getting this error.
The details of column in parent list is given below:
Type: Single Line of Text & Not Unique
As a workaround, we can use SPAutocomplete of SPServices library/REST API to avoid List View Threshold issue. Check the articles below.
Similar thread
Automatic Parent/Child List Relationships for Large Lists in SharePoint

How can I create multiple field sets in a list item in SharePoint 2010

Spawnable Field sets, bunches of them - all on a single list item. Can it be done?
In our particular instance, we're creating a look-up field and a couple of text fields that relate to the item.
The user needs to be able to generate those field sets multiple times in the same item, to look up a distinct value, and also enter information about that look-up in the other text fields.

Add hyperlink column to InfoPath 2010 repeating table

I'm using InfoPath 2010 to customize a SharePoint 2010 list form. The Infopath form shows data from two SharePoint lists, a Parent list and Child list. The Parent list is the primary data connection. The Child list is a repeating table bound to a secondary data connection.
I would like to add an "Open" link to each row in the repeating table that links to the full child record.
The link would be something like http://myserver/_layouts/listform.aspx?ListId={LIST_GUID}&ID=THE_LIST_ITEM_ID.
To do this I bascially want to add a column to the repeating table and use XPath to generate the link tag but I can't figure out how to do that.
As you've said, you simply add a new field to the repeating table with data-type "Hyperlink (anyURI) and then you set the default value of that field to "concact(http://myserver/_layouts/listform.aspx?ListId=; LIST_GUID)" where as the LIST_GUID is a field of that same repeating table
i've created a test-form where ive done exactly that - http://db.tt/dPW7Gll

Access multi selection list box as a criteria to INSERT, UPDATE OR DELETE records from a table

For a database with this schema (a product may belong to one or more categories):
Item_category(product, category_name)
Category(category_name)
Will it be possible for me to build a multi-selection list box (List box data source from the Category relation) using an Access form and then highlighting the categories that the product belongs to (by querying the Item_category table), and at the same time letting users select new categories or deselect highlighted categories so that when an "Update" button is pressed, VBA code will automatically determine either INSERT, UPDATE or DELETE queries are needed to update the Item_category table?
How can I do that? Thanks!
I've generally done this type of interface using a form which looks very much like the "Which fields do you want on your form?" in the Form Wizard. Where you have the Table/Query list of Available Fields in the table in the listbox on the left hand side and the Selected Fields in the listbox on the right hand side. Along with the move left and right command buttons in the middle. The users quite like this interface.
Added: Note that the left hand listbox contains all the category records which aren't present in the products category table. So a category would be present in one or the other listbox but never both.
You very likely will want to use the Multi Select property of the listbox. If you hit the help on that field in the property sheet it should lead you to a page which mentions the ItemsSelected collection. Visit that page for sample code on how to read all the items selected by the user. Or visit http://msdn.microsoft.com/en-us/library/aa196172%28v=office.11%29.aspx.

Populating a combo box in Infopath from a webservice

Aim: to create an Infopath form that displays a list of companies in a combo box and displays additional information when a company is selected.
The data will be served by a WCF webservice talking to a SQL Server backend. In theory I should be able to use a stored procedure (and associated methods in the webservice) to get a list of all the companies and their associated ids, populate the combo box in Infopath, then link the selection of the company name to its id and then pass that id on to another stored procedure to return the additional information.
However, when I try to wire up my webservice method to return all companies, I can't plug the company name field into a single combo box as the data returned is repeating.
Am I doing this wrong? Should I just use a single method that returns all company information (there's about 700 or so) and then create a filter on the company name field instead?
the combobox returns one single company id. This id can be used to search the company name in the company list returned by the webservice.
Can do without coding:
Create a rule 'CompanyIDChanged' on the combobox.
Then create an action 'Set a fields value' for this rule.
Set the form field 'CompanyName' to the value 'CompanyName' of the webservice.
Use a filter on the value to set CompanyName for the correct CompanyID. The filter should be 'CompanyID' in the combobox = 'CompanyID' in the webservice.
Regards Jack Graus