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

Featured Replies

  • Newbies

I have a field where people have already entered lots of comments with a date next to the comment in the date format x/xx/xxxx. I made a new layout where i want to display the data from this field but I want to have any dates show up in red. I Know the calculation for styling text red, and I know how to filter to find the date but I don't see how to make them work together. Any leads to a solution is much appreciated! Thanks!

Hi

when you say: "...with a date next to the comment... ", do you mean:

date comment

or

comment date

?

  • Author
  • Newbies

so here is an example of one record from my "comment" field:

"03/07/2007: Today this is my comment"

I have a lot of comments like this already entered.

The goal is to make a report layout that will printout all these comments with all the text, but anytime the date is displayed it would be red.

Ok

Give a try to this custom function:

/*

RedDates custom function

Format: RedDates ( text )

parameter:

text - a text that has a date on the left and a comment; it may contains many line such this

Returns the same text, but with red dates

*/

Let([

line = LeftValues ( text ; 1 );

next = RightValues ( text ; ValueCount ( text ) - 1 );

d = LeftWords ( line ; 1 );

rest = RightWords ( line ; WordCount ( line ) - 1)

];

Case(

Length ( next ) ; TextColor ( d ; RGB ( 255 ; 0 ; 0 ) ) & " " & rest & ¶ & RedDates ( next );

TextColor ( d ; RGB ( 255 ; 0 ; 0 ) ) & " " & rest

)

)

It almost always works better to have your comments (or notes) data as records instead of multilines within a text field. If you wish to sort (or restrict by date), you won't be able to do it. And if you wish to report at all, you won't be able to split the field back apart. Why put together just to break it apart again? You may also find the need to filter or display the comments by staff member who created them; which, if you captured the creator, would be easy. As it is, you'll again have to attempt to split the data. Management and staff may SWEAR they won't ever want this information but, sure as the sun rises, they most certainly will. :crazy2:

It takes no more work to set it up and it'll save you a ton of work later when you'll be changing your process AND attempting to split the data. Just a thought ...

LaRetta :wink2:

Create an account or sign in to comment

Important Information

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

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.