Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

field that will change color.

Featured Replies

Is it at all possible to create a script that will change background color based on a calculation? example: if the number goes under 100 it will be in green and if it goes above it will change to Red. If so how?

Thansk,

RET

Not exactly, but you get the same effect. What you do is make your field transparent and place a calculated container field behind it.

I usually create a repeating global container field to store the colored backgrounds. To get the background colors, draw colored rectangles in layout mode (same color borders and fills), copy one, enter browse mode, click in a repeat of the container field and paste.

gColoredBkgds (global, container, repeating)

Then create a calculated container field:

cBackground (calculation, container) =

Case(

**Test for first color here***, GetRepetition(gColoredBkgds, 1),

**Test for second color here**, GetRepetition(gColoredBkgds, 2),

.

.

.

"")

In layout mode, select cBackground, Format menu --> graphic, select "reduce or enlarge" and uncheck "maintain proportions", and finally size cBackground to be the same size as your calculation field and place it behind it.

It's much harder to describe than to actually do!

-bd

As bd said its easier to do than explain, the way I did a balance due field that changes colors is created two new fields one field Bal due black text and one field is Bal due red text I made them both calc fields - Case(ACC REC PAID DATE > 1/1/98 and BAL DUE < 0,BAL DUE) this calc is for black text - Case(ACC REC PAID DATE = "" and BAL DUE > 0,BAL DUE,ACC REC PAID DATE2 > 0,BAL DUE) this calc is for red. I used my account paid date 1 & 2 as a check for balance dues then I made my calc fields transparent and layed over my Bal due Field so when a customer has paid an invoice the Bal due field turns black if there is a balance the field is red.

Hope this helps.

Dean

  • Author

Thank you much, your instructions worked great. Also thank you for being so detiled, normally I would have never figured it out.

RET

I like this process a lot. I'm using it more and more. Taking this one step further; you can make entire layouts change color or graphic based on calculation by placing the color/graphic field the layout.

mb

I like it! We could ask the user their mood on login and select a appropriate background or pick a pleasing backgound and random from a set. It would make those business databases less boring!

-bd

Yes, and being as they are, businesses, most of them will hate it.

Their loss.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.