0

I am building a InfoPath form in SharePoint and I would like to use the ID Counter in another field so I can rename it to something else. I would also like the count in the new field to be ID+5000, for example the first form submitted would have the ID 1, but new field would show 5001

Hope this makes sense! Any help would be great on how I can do this, I have tried everything..

0

You can't get the ID until the form is saved. Only after submitting the list item, the ID should be generated. You should able to get the previous items ID and add 5001 to that ID and then assign the value to another field.

Steps to get the previous item ID:

  • In infopath designer, click Data Connections in Data tab
  • Add new connection and choose recieve data
  • Click next and choose SharePoint library or list
  • Give the URL and select the current list you are working
  • By default the Id field is selected, Click next
  • Finish the setting and go to the field that you want to set new value
  • In the fields properties, click default value fx button
  • Insert function -> max() -> double click to insert field
  • In that click the Show Advanced view
  • In drop-down choose your data connection name and in data-fields you will get the id, Select the ID and Click OK.
  • Add 5001 to that value

Thats it. Make this as Answer.

  • What formula would you use for this? Thanks – user3560464 May 6 '16 at 10:10
  • Answer edited please check this and make this as answer. Thank you – Mohamed Arif May 6 '16 at 10:40
  • Sorry to sound stupid, where do I add 5000 to it? – user3560464 May 6 '16 at 12:56
  • Build your formula like this max(ID) + 5001 – Mohamed Arif May 6 '16 at 13:10
  • Whenever I add the formula to +5001 I get errors on sharepoint. – user3560464 May 6 '16 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.