Display Form Name (before document is saved)

Let me precede with saying I am using the term “Form” as the design element and “Document” as a form after it has been saved in the Client.

So in Designer I want to use a computed text at the top of my form (and for the form title) that simply pulls the name of the form when a new document is created in the Notes Client.

But there is a problem, the reserved field “Form” is only populated with the form name after a document has been saved — rendering it useless for new documents in the Notes Client.

So then what do I use to programmatically display the name of the form in a new document?

Subject: Display Form Name (before document is saved).

Well, usually, it’s the other way around.

You are creating a new document based on a form, so you must know what form you are before you create it, right?

So, usually, your form will be programmed already with a “user friendly” name, regardless of what is inside the “form” field.

Let’s say your form name is “ExpenseRequest”.

You will create a button in the view called “New Expense Request” but that button will do:

@Command ([Compose]; “ExpenseRequest”)

You know the document is going to be an expense report, because you create that document using the “ExpenseRequest” form.

In that form, i would create a field to store the document type, user-friendly name. Let’s call it the field “FormName”.

That field is computed when composed, and has the formula:

“Expense Request Form”. I will use it to display in the document’s header as well as in the window title.

Each time a document is created from the “ExpenseRequest” form, this field will contain its title.

When you save that document, the reserved field “Form” will contain “ExpenseRequest” (the programatic name) while the field I created, the “FormName” field will contain the title.

Is it clearer now?

hoping this helped :slight_smile:

Nicolas Abesdris

Subject: RE: Display Form Name (before document is saved).

Thank you for your suggestion but I failed to communicate why I wanted this. My fault.

I Copy/Paste the Forms in Designer and rename them to the new form, all fields, computed text and formulas are based off of the form name making them nearly universal from database to database.

Using your method I would have to also open each new form and update the hardcoded form name. But using the method I was asking about, once I rename the form in designer the field would display that name when opened in the client.

Also I don’t currently need to go to the extra step of doing a @Command([Compose];“FormName”), — No need to do this extra step when Notes built in the form names if you omit the parameter and let the user choose with a simple @Command([Compose]). I’m trying to streamline/simply the process for use in the future as much as possible by using as many programmatic fields and options as I can.

I dont know if what I am asking is even possible to do? I’ve never seen it done before or even talked about?