2

I have created a custom list form in InfoPath, and successfully deployed it to a sharepoint list. it's contains several text boxes, and dropdown lists.The dropdown lists pull data from a separate sharepoint list. one dropdown is retrieving a column that has alpha-numeric character (A-F), and gives a validation error:

"only positive integers allowed"

I have double checked that no validations have been enabled.

thanks, Jason

6

My guess is that the error is thrown by a SharePoint field that's is a lookup and it expects an internal ID of list item, not its actual value (visible in the dropdown list).

Setting up dynamic drop downs in the out of box SharePoint forms

If you get an error that says Only Positive Integers Allowed, you're trying to save a string into a column that is expecting a number. Most likely the Sub Project drop down's value is set to a string but because the column is a lookup, it needs to be a number instead. To fix this error, right click on the Sub Project dropdown and choose Dropdown list properties. Then underneath Entries, change the Value from d:Title to d:ID. After you republish the form, the form should start saving properly.

4

I discovered solution in this post: http://iouchkov.wordpress.com/2011/08/24/list-form-with-multiple-selection-list-box/

Reason of this error is “default value” Multiple Selection box has behind. Multiple Selection List Box is a XML repeating section. If you will look into “XML” data, you will see that new form will already have an empty element, which can’t be submitted to the list where field is required.

Solution is relatively simple – remove empty default element. To do it, under “File” menu in InfoPath, go to “Form Options” and under “Advanced” select “Edit Default values”. Navigate to your repeating element and just remove checkbox left to the Value. That’s all.

1

Marek is partially correct, but his answer needs some clarification.

First, open the form in InfoPath.

Click the field you want to edit and then the Control Tools/Properties tab. Click the Edit Choices button in the ribbon.

In the Drop-Down List Box Properties dialog box, you're likely to see the entire default value in the Entries field. Click the Select XPath button to the right of the Entries field. Select only the top-level of the list item in the next dialog box.

That will automatically populate the Value and Display name fields below the Entries field.

Now click the Select XPath button to the right of the Value and/or Display name fields and select the ID for the Value and the field name for the Display name field.

That fixed it for me.

1

I had the same problem but couldn't use the solution Marek gave. (it works, but I use that result to query other fields)

What solved the problem for me I found here

Deleted the Lookup column in Infopath.

Returned to my SharePoint list and made sure the column was removed from there as well.

On my SharePoint list, I added a CHOICE field (not a Lookup), and I didn't add any choices.

Then, I clicked "Customize Form" to open Infopath again.

I then inserted the new choice field into my form.

Selected the new field, and then clicked on "Control Properties". Changed the data source. Published the form, and tested the field. It worked!

Angela Hohman

Credit goes to Angela Hohman!

0

Your column is required, uncheck required and the error will go away. a validation rule would replace your required option.

  • Okay, I understand that i should change the value from d:title to d:ID, but when i do that, the textboxes that are supposed to be populated are still blank when I make a selection – user14302 Jan 22 '13 at 9:38
0

On my form, I needed the dropdown from secondary data source to be blank (null) but it was defaulting to 0. 0 was not allowed as an ID (ID's must be 1 or higher). So I fixed it by clicking File, Form Options, Advanced, and clearing the checkbox at the bottom "Treat blank values as zero".

Keep in mind that existing list entries that have interacted with the form will show the error because they already have an invisible 0 in them.

Seeing if this will help another issue I have with blank entries on a People Picker field that keeps defaulting to ,#,#,#,#; and has been driving me nuts for serveral months.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy