Jump to content
Server Maintenance This Week. ×

confused by conditional formatting


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

Recommended Posts

  • Newbies

hey guys i've been lurking around a bit, trying to figure out conditional formatting. so far it doesn't quite make sense to me.

i have a status field, let's say it's set to 1, 2, or 3

i want to change the color of the field and text based on the status.

the examples i've seen of the conditional formatting allows me to make a container field change its color to red, blue, or green. but how do I get this container screen to evaluate the status value?

i remember doing this for an invoices database i did back with filemaker pro 4 a long time ago in a galaxy far away.

Link to comment
Share on other sites

Please tell us what you're really trying to accomplish. Please use the real field names. You mention a status field and the use of a container.

You can either apply condtl formatting directly to your status field, and have the formula look at what the field contents equal, or you can have a container calc change its image based on the status field. Two different methods.

Link to comment
Share on other sites

As Barbara suggested, you can change the status field. You don't need a container at all.

Select your status field and:

'Value is' and 'equal to' and type a 1

Then below select fill of red, text of bold or whatever.

Then add second line same thing (and specify color green etc) ...

UPDATE: Even if you want a different 'block' to color instead of the Status field, just use a text block with a single space in it or use a button (without a script attached). Don't waste field definition adding a container field! If you go with the 'block' or button method, change the lines in the conditional format to Formula and Status=1 etc.

Edited by Guest
Link to comment
Share on other sites

Hi Lee,

Yes, I DID look at your demo. I showed a different (easier?) conditional format method (which many people overlook) which is using 'value' on the Status field itself (instead of using format).

And your demo was based upon using a FIELD - either the Status field itself or another field to hold the color. What I am saying is, if you want a separate block of color, that you don't need to use ANY additional field but rather just type a space on the layout (or use a button), drag to the size you want, and attach the conditional format to it. I felt that was important to mention since adding fields to the table when unnecessary should be avoided.

So I guess I was suggesting a fourth method. :wink2:

UPDATE: In addition, if we WERE to use your container method because we're using an older version of FM, you can fine-tune your calculation from:

Case (Status = 1; GetRepetition ( Colors ; 1) ; Status = 2; GetRepetition ( Colors ; 2 ) ; Status = 3; GetRepetition ( Colors ; 3 ))

to

Case (Status = 1; Colors ; Status = 2; Colors[2] ; Status = 3; Colors[3] )

I sometimes forget about the cool new way we can specify repetitions myself. :smile2:

Edited by Guest
Added update
Link to comment
Share on other sites

...and, if you are going to use a container, you'd want them published to a global container, so that you can store them once and reference them from anywhere.

Link to comment
Share on other sites

  • Newbies

I attempted to attach the file I'm working on but it's at 2mb zipped so i'm going to have to dork around with it to make a smaller version.The database I'm toying around with contains 2 letter-sized black and white scanned graphics; eventually I hope to eliminate those background images, but for now, they help to provide some needed mental structure for the hundreds of fields per page.

(edit - used 72dpi version of graphics which may not print as nicely but work fine for onscreen)

The reason that I may not want to use the conditional formatting directly on the field that has a certain value is that sometimes it's easier to see a visual indicator elsewhere.

there are no fewer than 3 areas which i'm just entering data locally as i mock this up, but which in future I plan to use relational ties to other databases. that's because they will each feature over a thousand items to select from and it would be unwieldy to have all that data stored directly in this main database. some of these fields should be placed on a page dynamically depending upon how many items i need them to list (~2-10), but that's my plan for "stage two". currently, layout 3 and 4 are pretty fugly.

d_d_charactersheet.fp7.zip

Edited by Guest
added fmpro file
Link to comment
Share on other sites

You need to read up on portals and join tables! I don't know if there is reporting required of your system, but your structure (as a flat file) will make it difficult.

For example, a character has many Magic Items (boy, this takes me back). Magic Items should be a separate table. Then, you need a table between Magic Items and the Character, which is a join table that contains the Magic Items that that character possesses.

As for using a scan as a template for a layout, I wouldn't. Try duplicating as much of this form using FM's layout tools.

By the way, databases aren't a FM term. FM has files, and each file can have many tables. Tables are related.

Link to comment
Share on other sites

hi LaRetta,

Thanks for replying to my post.

-- snip -- if you want a separate block of color, that you don't need to use ANY additional field but rather just type a space on the layout (or use a button), drag to the size you want, and attach the conditional format to it. I felt that was important to mention since adding fields to the table when unnecessary should be avoided.

Very cool. I like this a lot.

Case (Status = 1; Colors ; Status = 2; Colors[2] ; Status = 3; Colors[3] )

:doah:

I never thought about writing it like this, nice contribution.

Lee

Link to comment
Share on other sites

  • Newbies

i realize that using the scan as a background image is a terrible idea; reformatting the data to better fit an ipad's dimensions will be the end result, and the graphics will thus go away when i'm at that point. tomorrow i get to take the character sheet in its current layout on the ipad to a real game to see what all is wrong with it. right now the formatting for powers and magic items is quite dreadful (reads poorly, requires clicking in the description field to see all the text), but at least it puts all my powers on one page which is a more functional format than the one from the manufacturer (the scans). also there's a couple of places in the traditional layout where the math is wrong, and hopefully i'll be able to integrate the magic items and powers in such a way that when the keyword says implement, the bonus from the implement is added to the Attack and Damage totals.

databases, files, tables - each relational DB system has its own terminology. i haven't created any portals since the late 90's but that's certainly what i'll be doing here. i've got just the basic structure for magic items and feats in two separate files, but no content because i'd prefer to find a way to import it rather than typing it by hand. it'll probably be sometime in August before I'm ready to make my files relational - i've got an adventure to plan for this sunday, so there's less time for filemaker work than i'd like. currently i'm using acrobat forms to keep track of magic items but they're much less functional than what i have planned for filemaker (searching, limiting to certain classes, printing out selected cards for handing out to players).

Wizards of the Coast has TONS of content for their gaming system but they also keep it siloed so once you're using their tools, it's not easy to pull stuff out, even if it's pertaining to your own character. However every D&D game I've played in, the players and DM strive to be creative and make their own magic items and powers and feats, etc. - which for some reason, they don't have a method of allowing such customization in their .Net-based Windows-only tools. By using Filemaker, we'll be able to customize which items, powers, and feats are available in ways that the mother ship may not have intended :-) and they'll be available for Mac, Windows, and IOS.

tomorrow's afternoon looks less than busy at the office, so i'll finally have a chance to go through your various examples and suggestions in some peace and quiet. Thanks again for all your help.

Link to comment
Share on other sites

This topic is 5030 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
×
×
  • Create New...

Important Information

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