Sebastien Bergeron Posted February 10, 2007 Posted February 10, 2007 Hi, I need to change the color of a field (City) base on another field (Country) that contain a value list. EX: My value list is different country; USA , Canada, UK , France , etc. This Way, if I set the country field to USA the city field become Blue. or is I set it to France the city field would become green. Not the text, the actual color of the field . Right now, I am using multiple container field with global storage to get color from a picture wich is a solid color. Then in a calculation field (color_city) resulting in a container, I determine wich color will be use. It work pretty good, except that every time I open the file I need to restore the global field that contain the color. Is their a better way to do this ? or is their a way to make the global field permanent storage ?
Genx Posted February 10, 2007 Posted February 10, 2007 Take it off the server, set the global values and put it back on the server.
Sebastien Bergeron Posted February 13, 2007 Author Posted February 13, 2007 it's working, How come ? Should I always make modifications to a file locally ? And them put it back on the server? P.S = Are you really 17 ? Not that it is my bussiness, I'm just impress.
Lee Smith Posted February 13, 2007 Posted February 13, 2007 It is bad practice to work on served files. This has been discussed in great detail over the years. It will cause corruption. HTH Lee
mr_vodka Posted February 13, 2007 Posted February 13, 2007 Please see page 4 of the whitepaper that is linked to my signature file regarding global fields.
Genx Posted February 13, 2007 Posted February 13, 2007 (edited) It is bad practice to work on served files. This has been discussed in great detail over the years. It will cause corruption. Lol, you can't just say that Lee. What Lee means is that if your connection to the LAN breaks while you are doing something like defining fields or relationships etc. in the served file... There is a very high chance the file will become corrupted. RE: Making modifications locally... yes you should but i just thought you might want to know why. And why it worked in this case? Short version, globals are session specific and always reset to their original value (that value being the last value they were given when not hosted). -- Read the whitepaper for more info. And yes I am 17. Edited February 13, 2007 by Guest
Eggshen Posted February 19, 2007 Posted February 19, 2007 Back to this guy's original problem, is there a function similar to the TextColor function in FM 8.5 that can set the fill color of a field? That would be most fantastic, but I fear that it doesn't exist..
Alan H Posted February 19, 2007 Posted February 19, 2007 You don't need to use a global field. You can define a table with "normal" container records, put just one record in it, and link to it using the "X" syntax in the relations. This makes sure that the container records are not session-specific (as global varialbles are).
Genx Posted February 19, 2007 Posted February 19, 2007 ... Don't get global variables and global fields confused. While that is a potential way around the issue, you'll then have unnecessary TO's cluttering your relationship graph, each to their own i suppose though.
Recommended Posts
This topic is 6548 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