Submit problem with MAX() - InfoPath Dev
in

InfoPath Dev

Submit problem with MAX()

Last post 01-20-2012 12:11 AM by Mohammad Iqbal Basha. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 01-09-2012 12:39 PM

    Submit problem with MAX()

    Recently ran into a problem with an InfoPath form. Using ‘max(@ID_Num) + 1’ to submit the form returns error ‘The form was not submitted because a form named 1000.xml already exists in the document library at **** Library. Please contact the provider of the form' when submitting to a SharePoint list.  I believe the problem is the field in reference (ID_Num / string) on SharePoint List needs to be converted to an integer for the submit function to work properly.  Though I don't seem to have access on List to do this.  Was trying to use the function below, but InfoPath does not like. 

    max(number(@ID_Num)) + 1
     

    Any ideas would be appreciated!

  • 01-09-2012 05:14 PM In reply to

    Re: Submit problem with MAX()

    If I can't get this function to work is there a way to easily import...

  • 01-09-2012 09:16 PM In reply to

    Re: Submit problem with MAX()

    You shouldn't be using the number() function there.  That may very well be the problem.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-10-2012 04:41 AM In reply to

    Re: Submit problem with MAX()

    That could be true, but I need a way to convert the stored string values to integer. After 1,000 the MAX() alone stopped working.
  • 01-10-2012 05:13 AM In reply to

    Re: Submit problem with MAX()

    Why is it that you believe you need to convert them to integers?  Is it because they have commas or a decimal portion in them?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-10-2012 06:17 AM In reply to

    Re: Submit problem with MAX()

    Because the way its being sorted in the list and keeps trying to duplicate creating record "1,000" which appears on the top of the list.  Prior the ID_Num field was setup as a string, but need converted to integer.

  • 01-10-2012 07:10 AM In reply to

    Re: Submit problem with MAX()

    It just doesn't make sense that it would do that on account of the datatype. 

    Have you tried displaying the list's data in your form to see what values are there?  Does it display ID values of 1000 and above?  Maybe you've hit some limit for the maximum number of rows that can be returned.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 01-13-2012 07:31 AM In reply to

    Re: Submit problem with MAX()

    There was a non-number placeholder that was messing things up.  Once this was removed records were able to be created.  Still doesn't sort correctly, but converting to number should fix this.

     Thanks all!

  • 01-20-2012 12:11 AM In reply to

    Re: Submit problem with MAX()

    Hi Tonydotigr,

                Even I had the same issue. I am able to resolve it. The reason for getting such error message is with the Form library limitations. 

    To solve this issue, perform these below steps.

    1. Open Form library where you published your Infopath form.

    2. Go to Modify View option.

    3.  Go to Item Limit. There you will find the Text box.

    Change the item limit option according to your requirement.

    That will resolve your issues.

     Regards,

    Basha

     

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