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 what is inside the portal field

Featured Replies

  • Newbies

Hi,

I have a field - gender. I need to count number of males and number of females in the portal!! when i do count function it only read the first one in the portal.

I want to be able to say Select Gender = "Male" and Count. what do i doo??? please help!?!

Your best bet is a series of 4 calculations. The first two are created in the child table:

Males = Case(Gender = "Male"; 1)

Females = Case(Gender = "Female"; 1)

The last two calculations are created in the parent table:

MaleCount = Sum(CHILDTABLE::Males)

FemaleCount = Sum(CHILDTABLE::Females)

In the future, if you have more categories than just male and female, you are better off looking into subsummaries. Otherwise, you will need 2 calculations per category.

Edited by Guest

If you don't expect more categories than just male and female, you can make the gender field a number field (0 or empty is female, 1 is male - or the other way around). Then you can count them as:

MaleCount = Sum ( Child::Gender )

FemaleCount = Count ( Child::ParentID ) - Sum ( Child::Gender )

Note that this method implies a default gender when creating a new record.

  • Author
  • Newbies

hi,

thanks for ur help.. just one problem! when i try reading portal it only read whatever is in my first record. If it says "male" it counts rest of them as males and if first record is female it counts all the other records as females.

It's not clear what is happening? Did you follow the directions giving by me or comment? Which parts of the formula did programmed in? Any details would be helpful.

  • Author
  • Newbies

sorry..

this is how my database is

one file contains all the information about mice that we are working with. the information contains.. parents, date of birth, sex, colour, tag #. Now i am making another database that gets the information from this first database and puts in another database that organizes it according to the breeding pairs. I have a portal in the second database that gets the information from the first database based on the breeding pair (parents). The portal also gives information about the sex and date of birth of mice from that certain breeding pair. I need to summarize the number of females and males from each breeding pair. I used the formula given by "comment" and it works only if i have another field in the first data base. I wanted to be able to count the number of females and males using the portal and not have to make another field in the first database.

i am not sure if that is clear.

also i am not clear about using case function. Should i be using that in first database or second one where the portal is?

  • Author
  • Newbies

Here is the picture of the portal that i need to do calculation for.

I was able to do what comment said..

now i have another issue.. i need to summarize the genotype!! ie. have a small table saying that this breeding pair has 4 pups with "+/- cre/+ lox/+" and 1 "-/- cre/+ +/+".

lemme know if this is confusing.. please i really need to get this done soon :!!! any help wud be appreciated

thanks a million

portalcalculation_pic_copy.jpg

Letting you know it is confusing....

Yes, I am confused as well.

  • Author
  • Newbies

Sorry, here is another try!

If you look at the picture i have attached you can see that the portal has fields called

Fgl2

Cre

LoxP

I need to be able to summarize how many of those records have

Fgl2 = +/- ,

Cre = Cre/+,

LoxP = lox/+

So basically I want to write formula that would be something like {Count(IF Fgl2 = "+/-" & Cre ="cre/+" & LoxP ="lox/+")}

just one another question, is it possible to merge fields in portal?

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.