3

Getting the following InfoPath error: Only Positive Integers Allowed Error:

Followed following suggestion (well, my 2nd dropdown was already like below) and made sure it's like below. But still getting above error. Please suggest.

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.

3
  • I have resolved the issue by fixing the "Set a field" action rule for the 1st drop down to store ID of the second drop down instead of title. Now it's all fine. I am posting the answer in the event someone else running into same issue. Thanks MB Jan 27, 2012 at 18:34
  • Does this question relate to SharePoint and InfoPath? If not you should ask it in a specific Infopath forum, since it will be considered off-topic for our site Jan 28, 2012 at 13:31
  • a bit late, but for the record: yes, this is an intersection of SharePoint and InfoPath. Aug 17, 2012 at 15:21

5 Answers 5

1

I have resolved the issue by fixing the "Set a field" action rule for the 1st drop down to store ID of the second drop down instead of title. Now it's all fine. I am posting the answer in the event someone else running into same issue. Thanks

1
  • Just what I needed
    – Splunk
    May 20, 2014 at 9:48
0

Also make sure the lookup column in sharepoint is not set to required. I was unable to solve this issue for awhile, but I finally noticed that removing the "required" setting on the column within sharepoint will prevent the 'only positive integers allowed' from appearing on your form!

0

Do NOT - I repeat - Do NOT create the column in List Settings. Create the fields IN INFOPATH, in your Main data source. When creating the new field, choose the plain Choice field type (do NOT choose a lookup-sourced choice field).

Make sure you've set up your external data connections.

After you've created the field, go into the control properties and configure your choices to pull from the external data connections.

This resolved all of my issues with integer errors, choices not being able to cascade, validation, etc.

0

If you have modified the field to not be required, but still need the required validation, you will need to create a field validation rule in InfoPath.

Validation rule:

  • Condition: [field name] is blank
  • ScreenTip: Cannot be blank

Required validation rule

See the two posts:

0

I just recreated the field in the list - in the browser. After you customize the form, clicking on "Custom form (InfoPath icon on ribon)". Pull the field to the model, if not automatically, in my case, then it worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.