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.

counting selected items in value list

Featured Replies

The value list in question derives from a field in another file, and the values in those fields will be frequently edited: more records will be added, others will be deleted, and some will be altered.

The problem is that the text field created when a value is selected from the list continues to contain values that no longer appear in the value list itself. That precludes counting carriage returns in the list, which seemed like a good idea, till I thought about it.

So is there another way to count the number of items checked in a value list?

Oh. And a related question. I also want to ascertain whether a value selected from the same value list but via a pop-up window is identical to one of the selected items in the check-box field with the same value list. That works fine using the "pattern" function - but again it will find congruence between the chosen pop-up item and a value that had previously been entered into the check-box list but has since been deleted or altered and is no longer in the current check-box list.

If there were some way to edit the text field (automatically) so that it would always reflect the current contents of the check-box list - that would solve all my problems...

I hope someone is able to follow this confusion and can offer any suggestions.

Thanks for any and all help.

  • Author

Forget it.

I realize now it can't be done. (at least I don't think it can...) sorry to have bothered you.

I've decided to use two portals instead - which presents different if less serious problems. Please see my portal question.

Okay, it sounds as if you're wanting to have your text fields updated whenever a value list item is changed or deleted. Here's how I would do it, off the top of my head.

Force users to go to a special layout where modification of the field the value list is based. Set a global with the current contents of the text. If the record is deleted or changed (via a scripted 'Delete' or 'Edit' button), Set the global to a global in your main file and the changed data (or "", for deleted ones) to another global in the main file. Perform an external script in the main file that finds all records with the global's contents in the specific text field. Then loop to replace all instances of the global in the resultant records with the secondary global. You should then have an updated set so that your PatternCount( ) is valid.

  • Author

Thanks Queue. That would work. In the end, though, I opted for a portal and added a simple text field and a series of scripts to enter the contents into the text field and delete the dross.

Since the values are from related fields and only a few will be visible in each record in the main file, a portal seemed OK. But for a longer value list your idea would be better!

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.