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

Make script show text when a field has data

Featured Replies

I'd like to have a script that says "File Attached" or "Issued", etc. in red text when certain fields are occupied and not show any text when there is nothing in there.

So basically if a container has a file in it you would see text that says "File Attached" but if no file is in it, there would be no text. Or if a field has data in it there will be text, no data no text.

Has anyone had any experience in doing this type of script? THANK YOU in advance to anyone who responds!!! smile.gif

Where would you like this text to be?

If you want a separate field to show "File Attached" then you can just use a calculation field instead of a script.

if(not isempty(container field;"File Attached";"")

Michael has it, except for a missing close parenthesis after container field. You probably do not need the 'else' null ("") result either.

  • 2 weeks later...
  • Author

Thanks guys!

I keep trying it but I get "too many paramaters" error message. here is what I'm using:

if(not isempty("Attachment";"File Attached")

The field is titled "Attachment"...am I doing something wrong?

Remove quotes around the field name, so that it is not interpreted as text, and put a closing parenthesis after Attachment.

  • Author

Got it...thank you!!!!

If( not IsEmpty ( Attachment );"File Attached";"")   

  • Author

Hey I had one more question on this....I know I've seen this done (sorta) on a filemaker pro 7 sample db.

Is there a way to say 'how many' records/attachments,etc (I'm using portals for all these). so for example if there was 5 attachments it would say "5 Attachments", 1 attachment "1 Attachment", etc.

Thanks for any ideas!!!

You mean Count(relationship::containerfield) ? I have not tried that with a container field, but it might work.

  • Author

You mean Count(relationship::containerfield) ? I have not tried that with a container field, but it might work.

Worked great! Thanks! If anyone is curious you have to put this in a seperate field (not in the same one talked about earlier in this thread).

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.