I have a field called "Bulletin#" in my InfoPath form that increments on submit based off of the OOTB SharePoint column "ID".

The rule on clicking "submit" is to check to see if the field "Bulletin#" is empty; if not set the value to max(ID)+1. I have setup a receive connection to query ID.

I followed the same approach; created a receive connection to query Bulletin# (with the library sorted according to ascending ID, so it would get the last Bulletin# used) and use max(Bulletin#)+1. But I end up getting this:

enter image description here enter image description here

Is there a workaround or another approach to it?


  • What is max(Form#) returning? NaN is "Not A Number" – RJ Cuthbertson May 15 '12 at 20:48
  • @rjcup3 yes max(form#) returns nan, although I have set up the field with a integer data type. But max(ID) returns an integer. – user7400 May 16 '12 at 0:26

When I was selecting the field from the insert field wizard, I was selecting from under the query fields. When I selected from the data fields it worked just fine. enter image description here

| improve this answer | |

max(field) + 1

doesn't always work... if the form is opened in edit mode it increments again.

| improve this answer | |

Your Answer

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

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