Man I feel lame for asking what appears to be such a simple question, but I figure out how to do it.
So in designer if I create a new form and save it as “Form1”, what do I put in my Window Title object to programatically have the same name when used in the Client? I could hard code it, but the idea is that the title will change with the form when it is renamed.
I tried $Title, Title, $Form, Form among others but it always shows as “(Untitled)” in the client?
Form should do it - without quotes - sometimes you have to force the issue by putting a computed field on your form named “Form” and have the formula be the form name (in quotes) - ecspecially for new docs - I usually code something like:
I added a computed field and named it “Form” with your formula but it still doesn’t work. It produces the "New " but no form name after it. You said I might have to force the issue by putting the form name in quotes, but this is hard coding and would not change with the Designer form name thus defeating its whole purpose of being flexible and changing programmatically.
Surely there has to be a way of accessing the form name?
Yeah I’m finding that out the long way. It does work if its saved then closed and reopened, but it would really look better if it could show the form name before having to save without having to hardcode it, I mean the form is already named before creating a new document, why cant it reference the name?
Do you think I can I maybe set the window title name with an event formula or script after its opened (ie in the post open event), If so how? I unsuccessfully tried in PostOpen:
Hmm, Is the alias somehow accessible programmatically or do you have to hard code it each time also? If so, it doesn’t do me much good. For example, I am adding forms to an existing database. It already has about 50 forms in it and I’m adding 15 or 20 more.
Unless I can access the forms name or alias programmatically before the doc is saved then I would have to manually update the 50 previous forms in designer one at a time. If done Programmatically, I could simply add it to my subform one time and be done with it.
Since I have already named the form in Designer I don’t understand how the form (when being used in the Notes Client) cant retrieve its own name prior to saving?
For example, in Designer open any form and look at the window title tab at the top, That’s the name I want!!! There has to be some way of accessing it programmatically?
Not that I am aware of, Form is just another text field that is set to the current form alias whenever the document is saved. If a document has never been saved, there is by default, no form field.
If you have control over how the form is created, e.g. they hit a button that you created, you could maybe create a environment var to store the form alias, and pick that up in your subform. But I can see hideous bugs arising that way.