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.

Add text to text field based on checkbox

Featured Replies

I have three checkboxes (may add more later on) describing tasks performed on a regular basis

  • Stopped Processes
  • Ran EV Updates Batch
  • Compressed

I also have a Work Completed text field.

 

I would like to check a box and have its text automatically entered into a new line in the Work Completed text field.

 

Any help please?

Simply use another instance of your checkbox field formatted as an edit block rather than a checkbox. 

  • Author

That works but I guess I wasn't clear enough.

The Work Completed text field will require additional text as well and be printed to a separate report.

I wish to be able to inject the text from the checkbox set into Work Completed field.

I wish to be able to inject the text from the checkbox set into Work Completed field.

 

Why? You already have that text and can simply display it on the separate report in addition to the Work Completed field, e.g. by using Merge fields.

  • Author

Maybe I am trying to overcomplicate this

 

The Work Completed can contain other text as well as the text from the checkbox set,

for example

 

Powered on

Stopped Processes <<--checkbox entry

Ran BM

Ran EV Updates Batch <<--checkbox entry

Did a bunch of other stuff

Did a bunch more stuff

 

If I can achieve this simply with another instance of the checkbox set in text format, great, but when it comes to creating  the reports for printing (utilising merge fields as you suggest) how can I instruct FM to show the entries with additional text instead of the original checkbox set?

Seeing your sample data, I think what you really want is to keep a log of sorts; why not use a related table that also lets you record metadata about events, e.g. a timestamp and notes?

  • Author

Did think of that, and I have implemented that kind of thing elsewhere, but the result I need in this instance is a flat piece of text.  I wish i could explain better my reasons, but I cannot.

a flat piece of text

 

If that means what I think it means: using List() on the related Log records would give you a CR-delimited list of entries – which is exactly what you would start out with when using a checkbox-formatted fields. Such a list can easily be transformed using text functions.

 

The crucial differences are that the table approach doesn't require any complicated calculations to merge the contents of two fields, lets you record meta data, and – should that become necessary – allows you to find/sort/summarize the entries by any criterion (also across main table records) – all of which is complicated to impossible when using a single field with a list.

Using the related records suggested by eos, Work Completed = List(RelatedTable::Logfield).


Two minds with the same great thought, eos.

Powered on

Stopped Processes <<--checkbox entry

Ran BM

Ran EV Updates Batch <<--checkbox entry

Did a bunch of other stuff

Did a bunch more stuff

 

I am afraid that's not clear enough. Where do the other entries come from? Are they static text?

Work Completed = List(RelatedTable::Logfield).

 

Yes, but rather than creating a field, I was thinking about capturing that list when needed, transform it as required, then place it onto the report layout as a $$var.

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.