Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

Thanks

share|improve this question
    
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
add comment

2 Answers

up vote 0 down vote accepted

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

share|improve this answer
add comment

max(field) + 1

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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