Tell me more ×
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" – rjcup3 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

2 Answers

Try naming it something without a pound sign ("No" perhaps). No guarantees, but I'd start with that. Special characters are not always interpreted in their literal form.

Alternatively, try adding an event on that field to see what the InfoPath internal field name renders as. I'd be willing to bet the pound sign converts to Unicode.

share|improve this answer
You are right.I did notice the pound getting converted to unicode while adding it to the formula. Let me try renaming it and see it works. – user7400 May 16 '12 at 1:48
Well, I tried replacing "#" with "No", but I ended up with the same result. I have put up a screenshot as part of my original question. Is there another way I get this done? Thanks – user7400 May 16 '12 at 13:15
Are you sure the field is named "BulletinNo"? Or is it the title? It should be using the field name. For instance the screen shot you sent shows the field as "field3." Also, what is the data type of the "BulletinNo" field? – rjcup3 May 16 '12 at 13:59
I have mapped the field3(datatype is Integer(Whole number)) to the BulletinNo column in the library. And my receive data connection pulls from this BulletinNo column. I had it set up the same way while using ID. I have put up an additional screenshot with my original question. – user7400 May 16 '12 at 14:16
Is BulletinNo a lookup field in the library? – rjcup3 May 16 '12 at 14:21
show 3 more comments
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

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.