Gogargirl Posted September 8, 2002 Posted September 8, 2002 I have a text field called Name, and a text calculation field called Get_the_Name defined as Status(CurrentFieldContents). I was expecting Get_the_Name would show the contents of Name when I clicked in Name, but it doesn't. What don't I get?
Keith M. Davie Posted September 8, 2002 Posted September 8, 2002 You might find some useful information on the workings of this function by reading the TechInfor Article #107462
Gogargirl Posted September 8, 2002 Author Posted September 8, 2002 Thanks Keith. The info in the article is exactly the same as in FM Help. The example they give is: A field called "Name", in a file called "Customer" that contains the data "SomeShop" returns "SomeShop" when the cursor is in the "Name" field. I don't see the difference between their example and mine, only I get a blank field. I'm still baffled...
Keith M. Davie Posted September 8, 2002 Posted September 8, 2002 Ok. I don't have 5.5 or 6.0, so I do not have experience with this function. However, once you have created a couple of records, if you go back to the first record created and place the cursor in the field Name, you are saying that the Get_Name_Field does not then display the data in Name. In other words, must one first exit the field after entering the data before re-placing the cursor into that field to cause the display of that data in the calc field? Or is the data supposed to display in the calc field as it is being created in the text field since the cursor is defacto in the text field when entering data? I also noticed from the article that this function seems to be something which is often used with a ScriptMaker script. I got the impression that was the raison d'etre for the function, though one might find other uses. One can always create a calc field Get_the_Name = Name. But that may not suit your design purposes, which are not stated.
Gogargirl Posted September 9, 2002 Author Posted September 9, 2002 Thanks for your replies. To answer a few points: The calc is unstored. I can't have a simple Get_the_Name=Name calc field, as I want the user to be able to get data from a selection of text fields. I fiddled a bit and here's the outcome. In View as Form, if you click Get_the_Name, nothing happens. If you then go to the next record, the data appears. Say you had another text field (Name2) and you click between the 2 text fields, nothing happens. The data only appears when you go to another record. In View as List, no matter what you do, nothing appears in Get_the_Name. In View as Table (this gets complicated) if you click between the Name and Name2 text fields, nothing happens. But if you click into Get_the_Name and THEN into one of the text fields, the data appears. It will not change until you click into Get_the_Name, then the other text field. I'm sorry, but I don't think the way the calc behaves is as simple as FM's description "Returns the contents of the active field currently containing the cursor."
CobaltSky Posted September 9, 2002 Posted September 9, 2002 Hello Alison, I've encountered a similar problem with the Status(CurrentFieldName) function. These functions would seem to have been designed with scripts rather than calculation fields in mind - and the issue seems to be that simply moving between fields does not trigger recalculation of the function/formula - unless, as you've discovered, one of the fields involved is the calculation field itself. I'm not sure what your objective for this is, so I don't know whether this suggestion will be at all helpful, but an alternative way to achieve a similar effect is to create a global text field, plus a script along the lines of: Loop Set Field ["gCurrentFieldContents", "Status(CurrentFieldContents") Pause/Resume Script ["0:00:01"] End Loop Needless to say, you need to ensure that the user can cancel the script in some way when necessary. It feels a bit 'clunky' - and one would think that it shouldn't be necessary - but it may be serviceable, depending on your needs and reasons for wanting a feature of this type.
Gogargirl Posted September 9, 2002 Author Posted September 9, 2002 Thanks Ray. Guess you're right that this one works better in a script. I'll work around it by having the user drag and drop the data from desired text field.
Keith M. Davie Posted September 9, 2002 Posted September 9, 2002 Yeah, Ray, thanks. Considering all I had to go on was the TechInfo article, and from my reading of it I concluded "I got the impression that was the raison d'etre for the function,..", it is rewarding to know that I read the article properly. Of course, that was why I recommended the article in the first place.
Recommended Posts
This topic is 8262 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now