With which instruction can I put the value of the window title in a field?Thx
Subject: RE: How to put window title in a field?
If you have a Computed for display field, you can take whatever you’re using as a window title formula, and copy it into that field.
For a new document, the Form field has not yet been set, so you can’t use that. Anyway, if you’re smart you’re using an alias, so the name the user wants to see will be different from the value stored in the document. Just put static text on the form.
If these things are on a subform, and they have to work for multiple forms with different window titles, you could either fill in the window title field on Postopen using the Source.Windowtitle property, or you could have a hidden field on the containing form that calculates the window title so that the subform can refer to it by fieldname. The latter approach will also work for the “display name” of the form.
Subject: RE: How to put window title in a field?
thanks for the extended explications
Subject: RE: How to put window title in a field?
Hmmm, sorry, looks like I didn’t quite get you.
What I said is not wrong, but doesn’t really apply to showing the window title on a form. Anyway, Andre has given all the info you need.
Subject: How to put window title in a field?
A field on the very same form? You can’t do that.
I think it should be possible to retrieve the window title from a profile document.
Subject: RE: How to put window title in a field?
Is there then a possibility to put the form name in a field of that specific form?
Subject: RE: How to put window title in a field?
Actually, the form name already is in a “field” of the form: It’s in the $TITLE item, but you can’t use that in the window title formula. It’s all about the difference between forms and documents.
They are both “notes”, storing data in “items”, but they serve different purposes. The items of the design note are not available to documents created from that form. The “fields” that you put on a form using Designer are not individual items of the design note, so you can’t use those in formulas, that influence the design.
I’m not even 100% sure, if the profile document approach will actually work. I’ve never tried it (that’s why I wrote “should”). I suppose it will work, since the window formula is evaluated at run-time, but I don’t know (and can’t think) of a way to have make window title depend on a property that’s available at design time, only.