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.

Featured Replies

I have a Work Orders file that contains an order_no field and rev_no field. I want to find the number of numbers in the order_no field. For example, I could have:

order_no 1234 rev_no 01

order_no 1234 rev_no 02

order_no 1234 rev_no 03

order_no 5678 rev_no 01

order_no 4321 rev_no 01

order_no 4321 rev_no 02

and I would want the result to be 3. So what I want to know is the number of groups of the same number. Sorry if this is confusing but I didn't know quite how to ask the question.

I hope you are prepared to play.

Set up a valuelist based on the field order_no. The valuelist will remove duplicates. Then set your output field Num_of_Num to ValueListItems(filename, yourvaluelist).

I think Paul means PatternCount( ValueListItems(filename, "yourvaluelist"), "

  • Author

I get the idea behind making a value list and counting the number of items in it, but I can't get it to work. I have attached a file showing how I set it up maybe you can tell me what I'm doing wrong.

num_of_num Test.zip

Change "num_of_num Test" to "num_of_num Test.fp5" or Status(CurrentFileName) and change the calculation to be unstored by selecting 'Do not store calculation results' in the storage options.

  • Author

Thanks! It can be awful dark where my head is sometimes.

Adding fp5 isn't necessarily intuitive, especially if your OS is set to not display extensions. It took me a while to figure out the problem, too. I'm surprised it returned any value at all since the reference wasn't acceptable! There should be some sort of error returned instead. I prefer the Status(CurrentFileName) though, since it's much more dynamic and doesn't require tweaking if you happen to change the file name.

Cue the dancing hot dog banana:

yay.gif

  • Author

I agree about the Status(CurrentFileName) method, much more stupid resistant. Now I am trying to figure out how to make this calc work with only a found set.

Add a relationship from a global text field to order_no and base the value list on the related order_no. Then use the Copy All Records trick to get the order_nos for the current found set into the global field.

Check the attachment for how it works. Do a find, then run the first script. Note that you can 'hide' the global field or put it on a separate layout and change the script to go to that layout before the Paste, then return to the original layout.

num_of_num Test.zip

If there's anything I hate it's people 'correcting' my posts - especially when the correction is correct.

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.