Jump to content

Automatic Field Color


This topic is 5702 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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 ?

Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

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).

Link to comment
Share on other sites

... 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.

Link to comment
Share on other sites

This topic is 5702 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.