in

InfoPath Dev

Increment by 1

Last post 10-09-2007 04:08 AM by adamrharding. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-08-2007 01:50 AM

    Increment by 1

    Hi friends,

     

    I have a problem with getting this InfoPath form to work. Here is the story behind what I need.

     

    I have a project number and an issue number. A project number is unique to a project. An issue number is a unique value for an issue of the project. (1 project can have many issue numbers). So a project number would look like this; 100. Then an issue number for that project would look like this; 100.1, or 100.2 for example.

     

    What I need is the issue number to increment every time someone selects a project number from a form. So if a user selects project number 100, and the current issue is 100.1, it needs to increment it by one to 100.2.

     

    This information is read in from a form library within SharePoint. The structure of the form library looks something like this;

     

    Form – title – project number – more attributes here – issue number

     

    I currently have a data source that points to the Project number using a dropdown box. Then the issue number is a textbox, which needs to update automatically once the project number has been selected.

     

    My current formula looks like this; max(@Project_Number[. = project_no])

     

    This basically gets the project number from the form library as oppose to getting the incremented issue number.

     

    Please advise many thanks in advance!!

     

    Filed under: ,
  • 10-08-2007 02:51 AM In reply to

    Re: Increment by 1

     

    I've just tried this formula; max(@Issue_No[@Project_Number = project_no]) + .1

     This formula seems to work but its only getting the one entry that has a unique project number. I.e. i have about 15 entries in the list, but some of them have duplicated project numbers, because 1 project can have many issues. However i have one entry where the project number hasnt been duplicated, and this is the only entry the form is picking up, regardless of what project number i choose. Can you advise on this please? It seems maybe the project numbers cant be duplicated? Is there a work around for this?

     

    Many thanks

  • 10-09-2007 04:08 AM In reply to

    Re: Increment by 1

    Hi

    To achieve this goal you need to specify your field as 'Is Identity' and then set the 'Identity Increment" to 1, that way it will gurantee that no two forms have the same number and will go on indefinitely.

    I hope this helps.

    Adam

    Adam Harding
    Wales
    UK
Page 1 of 1 (3 items)
Copyright © 2003-2007 Qdabra Software. All rights reserved.
View our Terms of Use.