Form Change and Web

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’…

I tried to use QuerySave as follows:::

Call source.FieldSetText( “Form”, “Athlete” )

It does not work… HELP!

Subject: Form Change and Web

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.

Subject: Form Change and Web

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”.

Subject: RE: Form Change and Web

So good to hear from you!

I understand that, but for background processing of the data from other aspects of the DB that are quite complex, I need the “form” field changed…

Subject: RE: Form Change and Web

A scheduled agent ought to be able to handle that easily enough.

Subject: Form Change and Web - Agent

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?

Or is this not advisable?

Subject: Form Change and Web

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”.

Subject: RE: Form Change and Web

That was the first thing I tried!!

Computer Field - “Form” and assigned it “Athlete” - - - Does not work!

Works in Notes client… Not on Web

Subject: Form Change and Web - Solved

I used ‘WebQuerySave’ and a simple Agent to set the form to ‘Athlete’

Thanks