Solved! Go to Solution.
The first thought that comes to mind is to query the list and find the max(ID). Then increment it by 1. However, I have no idea if your link is going to work, because even though the link will be created, there may be a delay until the record actually exists. You'll just have to test it and find out.
However, I will add that this still won't be the best solution, because two people filling out the form at the same time will end up having the same URL. The new ID doesn't get generated until the submit button is pressed. If two people open a new form before either submits it, they'll have the same estimated ID. But when person A hits send before person B, they'll actually have that new ID, whereas person B will have the next one after that, meaning their URL will be incorrect.
Out of curiosity, what is the purpose of keeping the form open after you have created the new item? I was doing something similar recently and found that it was more confusing for users than the natural experience of being taken to a completely new screen (IE: The List).
That aside, your form should be in Edit Mode once you save the form using the standard 'Save and Continue' button. In the following example I have used the Out Of Box provided Common References in a few Calculated Controls to show each of the three Form States:
A New Form will show the following Output:
But as soon as I Click on the Save and Continue button, it changes to:
Using those Common References you should be able to easily check whether or not the form is in Edit Mode or not. Additionally you can use a formula along the lines of:
to know if the Item has yet to be created. It will evaluate to true if there is no ID and false if there IS an ID (which means that there is an item).
Hope this helps.