July 29, 200817 yr If create an unstored calc and set it to = Get(WindowName) will that calc always show the correct name for that window, even with multiple windows open (but different names) and displaying the same record?
July 29, 200817 yr No, not always - only when the window is refreshed. If, for example, you change the window's title while it's not in front, it won't redraw and the calc will continue to show the previous name until the next refresh.
July 29, 200817 yr Author Good point. But what if the user has no ability to change the window title? If you've got static window titles on several windows all showing the same layout and the same unstored calc, will the calc ever show the wrong title for its window? Get(WindowName) should show the currently selected window title, but if a window isn't the currently selected one, it still shows the "old" title in the calc field.
July 29, 200817 yr will the calc ever show the wrong title for its window? I don't think so, but I want to be careful here, because it's difficult to imagine every possible scenario. The only thing I am reasonably certain of is that when the field is refreshed, it will calculate the name of the window it lives in - whether that window happens to be in front or not.
July 30, 200817 yr One interesting thing I've found with window names (and I've been advised that it is a feature not a bug) is that when files are hosted, the default window name is the file name with the server name appended in brackets... Corporate Database System (FM Server 01) ... but the Get( WindowName ) function only returns "Corporate Database System". Go figure. :
July 30, 200817 yr I can confirm this. But it shouldn't mess up anyone attempting to call a window or use a window name in a calculatioN (but I might be wrong). But as test, WordCount produces the word count based upon only the window name (or layout name if window isn't named) even thought it shows (the server) at the end.
July 30, 200817 yr I agree LaRetta... and I can understand why FMI has chosen to do this... but I looks up and sees "filename (servername)" as the window name, but really it's not.
July 30, 200817 yr If it bugs you, you can always set the window title to Get(FileName) and the server name will go away.
Create an account or sign in to comment