Integer error in Sharepoint 2010. - InfoPath Dev
in

InfoPath Dev

Integer error in Sharepoint 2010.

Last post 11-01-2012 11:40 AM by komarag. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-01-2012 08:14 AM

    Integer error in Sharepoint 2010.

    I have a created a form with the following fields...

    Autonumber  (Integer) default value 100.

    Filename  

     I am posting the form to sharepoint list with "Autonumber" field.

    when I submit the form, Here are my steps.

    1. Query the sharepoint list on autonumber field

    2. updated the Form Field "Autonumber" with Sharepoint list Max(Autonumber) and increment by 1.

    3. Write the filename...This will create a new list item with different file name.

    When i submit the form, Here are my observations..

    Before executing the step2, the data in the autonumber is 100. After the call to the sharepoint list, it is marking as spaces. The error i am getting is " Only Integers are allowed".

     

    Any help is appreciated.

     

  • 11-01-2012 08:50 AM In reply to

    Re: Integer error in Sharepoint 2010.

    Hi - what is your rule that is setting the form field? Are there any other rules that may be affecting it? Drag your SharePoint list data connection onto the form and verify the values in the column are what you think they will be....
    Hilary Stoupa

  • 11-01-2012 09:26 AM In reply to

    Re: Integer error in Sharepoint 2010.

    Defined Autonumber  as Whole Number (Integer), default to 100.

    In the Submit button, the action rules are set like this..

    1.  Data connection to the sharepoint list that has Autonumber field. Selected Autonumber from data elements from that connection.

    2.   condition                 Autonumber>=100

     AutoNumber =  max(Auto_x0020_Number) + 1  

    3. submit data connection to the list.  I have a filename variable in the submit data connection as concat("filename-", Autonumber).  The list is submitted with this file name.

     Before submit button is clicked, I see the values in the form for the fields,  Auto Number as 100, file name as "Filename-100".

    Once the submit is clicked, I am seeing the Values as Auto Number as NaN, file name as "Filename-NaN". That's where I am getting this 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:AutoNumberError: Only integers allowed
    Click OK to resume filling out the form. You may want to check your form data for errors.

     

  • 11-01-2012 11:03 AM In reply to

    Re: Integer error in Sharepoint 2010.

    So, what I think is that your second rule is not returning what you expect. I would add another button for testing with just rule 1 and 2 on it. I'd make sure the data source queried in rule 1 is on the form so I can see the values. That will help you troubleshoot.
    Hilary Stoupa

  • 11-01-2012 11:40 AM In reply to

    Re: Integer error in Sharepoint 2010.

    I added another rule for handling 0 and blanks...if the retrieve value is 0 or blank, keep the value to default value....it worked. I am able to retrieve the max value.

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