I have a form in a database called ‘Athlete’… For reasons I have another form called ‘NewAthlete’… Based on certain conditions I need the person to create an athlete record via ‘NewAthlete’ - - - Once saved, I need the form to ‘converted’ to ‘Athlete’…
Use a WebQuerySave agent, a basic skeleton would be …
Dim session As New NotesSession
Dim doc As NotesDocument
Set doc = session.DocumentContext
doc.Form = “Athlete”
Call doc.Save(False,False)
To this you can add whatever logic you need, all this needs to go in an external agent which you call from the WebQuerySave event on your form. “Source” is a notes client thing and not available in a browser.
The easiest thing to do is to use a Form Formula on views that forces the document to open with the desired form – it will look to all the world like the form is “Athlete”, and if it is ever edited, the form will be “Athlete”.
The ‘create’ of a NewAthlete should be a rare occurance.
Can a form used from the web save the UID of the document as a variable in the INI on the server and then have the ToolsRunMacro - get the UID and make the easy change?
If you’re doing that it on the web, as the title of your post suggests, the QuerySave event will not trigger. The most straightforward way is for you to create a field called “Form” on the page, of type Computed, and set its formula to “Athlete”.