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.

Change Row Color?

Featured Replies

I am working on a pre-inventory form. The form will basically be listed by product SKU numbers.

Each line (row) of the form will contain a different product SKU number, for example;

Product #101010

Product #111111

Product #123456

 

The stores database automatically keeps track of each product amount in stock, BUT, because of theft and misplaced items, we count each item every morning and night, and then compare it to what the stores database says. 

I'd like to make a conditional, where when the amount counted equals the amount the database says we have, the entire row turns green. If it doesn't equal the same number, then the row turns red.

How would I do this?

 

Conditional formatting is the magic phrase to have a look at...

  • Author

Thanks webko.

Wondering if it's possible to have the conditional formatting for a set amount of time, and then have it revert to normal.

For example, it turns the field red for 10 seconds - and then it turns back to the previous background color again.

Is this possible?

11 minutes ago, AngelArs said:

it turns the field red for 10 seconds

10 seconds beginning with ... ?

  • Author
9 minutes ago, comment said:

10 seconds beginning with ... ?

...when it first changes to red.

2 minutes ago, AngelArs said:

...when it first changes to red.

Assuming you mean when the field is modified: it is sort of possible, but you would have to script it, it would take a lot of work, and you probably wouldn't like the result because of too much flashing. I would suggest you stick to built-in features, such as conditional formatting (permanent for as long as the condition is true), or a script trigger to pop up a message.

6 hours ago, AngelArs said:

...when it first changes to red.

This could be fairly easy to do by installing an on script timer set to run in ten seconds. I would keep it as light as possible, like setting a global variable and refreshing an object in the window. That could work regardless of context if your user navigates away to another layout. You can also put a script trigger on the layout to handle if they leave the layout as well.

I'd query why this is thought necessary - you either have the correct amount of stock on hand, or you don't. If the numbers are different, then a visual marker for that isn't a bad thing...

You could vary based on time modified compared to now - which would re-check the conditional formatting on window refresh, so coming back later in the day might change the visual effect on the relevant records.

Hi AngelArs, and welcome to the FM Forums,

I’m a little confused, are you looking for something along these lines?

Change Row Color.fmp12

  • Author

 

23 hours ago, webko said:

You could vary based on time modified compared to now - which would re-check the conditional formatting on window refresh, so coming back later in the day might change the visual effect on the relevant records.

Counts are performed twice a day (before store opens, and after store closes) but not during the day. 

 

 

22 hours ago, Lee Smith said:

I’m a little confused, are you looking for something along these lines?

Change Row Color.fmp12

Hi Lee, when I opened up the file all I saw was a dark header and a blank page. 

Go to the Change Row Color 2 layout....

  • Author
13 minutes ago, webko said:

Go to the Change Row Color 2 layout....

Thank you :)

23 hours ago, Lee Smith said:

I’m a little confused, are you looking for something along these lines?

Change Row Color.fmp12

Not exactly.

As the person is entering in the data I was looking to change the entire row (background) red to immediately alert them of a problem. Would be great if there was a "reset" button to undo the red background (could be reset for entire form if making it for individual row is to hard to make). Having said that your example would work in a pinch. 

OK, try this one...

No row will be coloured to start with - if there is data entry that results in an issue, the row turns red. It will stay red for at least 15 seconds, and then will change if:

1. The layout is navigated away from and then back (to simulate, go to Layout Mode and then back to Browse mode)

2. The record is touched again (placing a cursor in a field after the 15 seconds is up)

The field zzBlank is underneath the data fields, and has the conditional formatting applied to it 

Change Row Color 15sec.fmp12.zip

  • Author

OMG, yes that works webko! What did you do to get it to work that way? 

I made a couple of changes to @Lee Smith version.

I added a ModifiedTimestamp - Timestamp field that auto-enters the Modified Timestamp

Then I made the conditional formatting attached to the zzBlank field check the current time vs the Modified TimeStamp as well as whether the count is out.

It will only evaluate again if the screen is refreshed, or the row is updated. 

It's the practical version of what I suggested earlier.

2 hours ago, AngelArs said:

the file all I saw was a dark header and a blank page.

Sorry about that, i should have made a open script and removed the layout from view. It was just a proof of concept to see if we were all on the same page.

@webko Nice modification of the file to move this forward.

Lee

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.