What version of FoxPro (DOS or Windows?) and are you using .PRG code or .SCX screens? Do you want this always invisible, or to conditionally turn it on and off? What kind of field (e.g. GET, SAY, EDIT, LINE, etc.)?
Long story. I have to use two fields for the same value. The field where the users select the value has to have a specific name in order to use the look up function (which i'm not about to rewrite). Then I transfer that value to the other field for saving, which is the field on the table. That probably doesn't make sense, but this application wasn't written that well to start with and I just get to maintain it and fix it for our users. What I've now been able to do is have the fields overlap each other on the screen so only one is visible, the one they use to actually select the value.
I would recomment that instead of using Invisible fields, you might want to consider using a separate memory variable for your SaveToDBF value. You do not need two GET Fields for the same value, merely two memory variables.
You could initialize 2 unique memory variables (example: m.SaveToDBF and m.UserEntered) for the before entering the screen. m.SaveToDBF does not need to be displayed on-screen (or in an Invisible GET). That initialization could be to a default value or to the value already existing in the associated table.
Then within the screen itself, you can assign m.SaveToDBF a new value within the Valid function of the m.UserEntered's on-screen GET (or within part of a Save function within the screen Cleanup). m.SaveToDBF's assigned value can be the same as the m.UserEntered or it can be a "massaged" value.
In that way you would not need to mess with Invisible GET fields which do not add any functionality, but are being considered merely to hold a "massaged" value.
Good Luck,
JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.