Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Counting what is inside the portal field


This topic is 6625 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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!?!

Posted (edited)

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
Posted

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.

  • Newbies
Posted

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.

  • Newbies
Posted

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?

  • Newbies
Posted

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

  • Newbies
Posted

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?

This topic is 6625 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.