how to create a consecutive/incremental number calculation?? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

how to create a consecutive/incremental number calculation??

Last post 01-21-2009 12:52 PM by dbeau. 20 replies.
Page 2 of 2 (21 items) < Previous 1 2
Sort Posts: Previous Next
  • 07-24-2008 06:51 AM In reply to

    Re: how to create a consecutive/incremental number calculation??

    I am trying to use Hans Andringa post.  However upon submitting the first report, the ReportNumber field throws an error;

    "The form cannot be submitted because it contains validation errors.  Errors are marked with either a red asterisk (required fields) or a red, dashed border (invalid values).

    Field or Group: my:PIR_ID (ReportNumber)
    Error: Only integers allowed. 

    I have checked the rule, and its setting the value of the field to the number 1.

    Any help is appricated, I've been looking for a solution like this (no code) for some time and it would be great if I could get it to work.

    Thanks,
    Kevin

    UPDATE:  I was able to get this partially working.  There was an error in the 3rd rule, once I corrected it I was able to submit to the library correctly.  Now when I try to go back and edit the form I just submitted I get an error. 

    Almost there...

  • 11-24-2008 09:32 PM In reply to

    Re: how to create a consecutive/incremental number calculation??

    Hi,i am new to infopath,i want ro generate automatic request number to my from,i read ur solution but Can u please tell me where can i find set condition.i am using infopath 2007.plz reply soon...
  • 11-24-2008 09:59 PM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: how to create a consecutive/incremental number calculation??

    Hi,

    When you submit a form to sharepoint, sharepoint creates an ID for your form, this is a sequesnce number. What we normally in our projects is, 1. Submit the form to sharepoint 2. Get the ID created by sharepoint and set this value in the form. This is done using sharepoint "_vti_bin/lists.asmx" webservice. 3. Submit the form to sharepoint again.

    Read below link to get the ID from Sharepoint.
    http://www.infopathdev.com/blogs/agni/archive/2006/05/15/Query-for-Items-in-SharePoint-Form-Library-Using-GetListItems-Web-Method.aspx

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 01-20-2009 03:40 PM In reply to

    • dbeau
    • Not Ranked
    • Joined on 01-20-2009
    • Posts 3

    Re: how to create a consecutive/incremental number calculation??

    I apologize for resurrecting an old thread but I had this bookmarked and couldn't find any newer relatable posts.

     We currently have a PO system in place where our users create new POs and I used this code (max() +1) to generate incremental PO numbers. We started at PO#9998 and we had no problem going all the way up to PO#10100 however it will not proceed past that. Any new POs that are generated are given 10100 without incrementing. Anyone have an idea on why this would be?

     Thanks in advance!

  • 01-21-2009 08:42 AM In reply to

    • dbeau
    • Not Ranked
    • Joined on 01-20-2009
    • Posts 3

    Re: how to create a consecutive/incremental number calculation??

    Just confirmed that the 'max' number it is seeing is 10099. So I am able to add +1 but no more. Even if I put +10 it will still only add to 10100. Is there a character limit on what the max function can work with?

  • 01-21-2009 12:52 PM In reply to

    • dbeau
    • Not Ranked
    • Joined on 01-20-2009
    • Posts 3

    Re: how to create a consecutive/incremental number calculation??

    Well I was able to figure it out. In Sharepoint the functions were only calculating based on the items that were in the default view. So we had 2 pages of items yet only 100 items on the first 'default' page. I was able to figure this out when I decided to do a count function instead and ran into the same issue. So I was able to change the default view so that my highest PO number showed up on the default first page. That way my max function would work properly. Even if the sorting was changed. It also works to change the default number of items in the vfrom 100 to something bigger. It jsut sucks having to scroll through a ton of items.

     Anyways, just thought I'd share...

Page 2 of 2 (21 items) < Previous 1 2
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.