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.

Calculating percentages of pop-up value list

Featured Replies

  • Newbies

My first Database with FM pro 5.5 I have a text field with a pop-up value list of types of deliveries (I'm an obstetrician) ie. normal deliveries, various forcep deliveries and various cesarean sections. I haven't assigned a field value to any of these types of deliveries but I did out of neccessity define a value list in order to make the pop-up. My problem is that I would like to extract the data as percentages of total deliveries, ie. percent forcep type, cesarean section, etc. Do I need to go back and make a portal to the field and loose all my entries or is there some way to get at this in perhaps a running tally. Keep in mind when and hopefully if you answer that I have little knowledge of what I'm doing. Everyone at work says drop filemaker pro and go to a PC and use Microsoft access. I prefer the Mac

The first part of solving this problem needs some FM experience. The second needs some basic math, i.e. Excel. Without knowing the full structure of your file(s), however, I can only point you in the right direction.

Do you know what a self-relationship is? Because if you don’t want to use a second file, you will need one. If you create a self-relationship to create a portal, you will not lose anything. This would be one solution:

Firstly, you need to count the full total of deliveries – I trust you can do this?

Then -

Use your items field (pop-up menu) to create a relationship to itself. So for example, if the field is called <Item>, create a relationship using this field, lets call the relationship Rel_Item.

Now create a calculating field (not stored) called <count_items>, this will look like this:

Count(Rel_Item::A_Field)

A_Field is any field that always has a value other than 0

So now you know how many of any particular item have been taken.

Now create another calculating field (not stored), lets call it <Item_Percent> that simply divides <count_items> by the total number of deliveries, and set the field in your layout to percent.

I hope you can make sense of this, and that it helps.

Rigsby

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.