Getting error while submitting the InfoPath from with Lookup fields
Issue: Getting error while submitting the InfoPath from with Lookup fields.
Error Message:
InfoPath cannot submit the form, because it contains validation errors. Errors are marked with either a red asterisk (required field) or a red, dashed border (Invalid Values)
Possible Causes: On your InfoPath form you have some fields, which doesn't contain the expected value.
Details:
My customer was using the lookup type field on the InfoPath form and was selected the text from that drop down. After selecting the value, he was getting dashed border on that drop down and when we hover the mouse on it was showing "Only Positive Integer allowed".
I went ahead and created another drop down and tried pulling the same data but even after selecting it, I didn't get any error. For further research, I opened the properties of both drop down:
Image:2
The only difference which I found was Data Type of drop down. In the non-working drop down it was LookupType and in the working one it was ChoiceType. Customer was getting validation error because you can't select text in LookupType field.
Solution:
Remove the existing drop down (Data type: LookupType) and create another drop down (Data Type: Choice Type) and pull the data from the same data connection, from where you were pulling before.
Published By: Himanshu Saxena
Comments
Anonymous
September 15, 2015
Make fields like this: Value: ID Display Name: CIty This is perfect solution. It is expecting number in ID field.Anonymous
October 22, 2015
Hi, It is not necessary to have ID in the value column. We can have a text also this field is just to contain the actual value of the display value. Please let me know if you have any other question.Anonymous
July 20, 2016
Whoo Hooo. Thanks, I have been searching everywhere to find a solution to this issue. You well laid out explanation helped me resolve the issue. I tried it and it works like a charm.