How to display most recent record in portal (?)
How to display most recent record in portal (?)
am 13.09.2007 03:31:14 von Lemur
Hello,
I have a database that handles a slew of "running totals" (for
argument's sake, call it 'calories consumed').
Let's assume, in this database I have 8 people listed, and I have all
their calories for each meal during a week (21 in total).
If I want to have a portal that shows each of the 8 people, with the
total calories consumed (i.e., the total from the most recent record),
*sorted* in descending order of total calories - how would I be able
to do that? When I set up a typical portal, it seems to pull the data
from the first record in the database; not the most recent (which
contains the information I need).
I'm using FM 5.5 -- it seems like there SHOULD be a way to accomplish
this, but I'm drawing a blank!
Chris
Re: How to display most recent record in portal (?)
am 13.09.2007 13:21:56 von ursus.kirk
"Lemur" schreef in bericht
news:1189647074.002529.235190@k79g2000hse.googlegroups.com.. .
> Hello,
>
> I have a database that handles a slew of "running totals" (for
> argument's sake, call it 'calories consumed').
>
> Let's assume, in this database I have 8 people listed, and I have all
> their calories for each meal during a week (21 in total).
>
> If I want to have a portal that shows each of the 8 people, with the
> total calories consumed (i.e., the total from the most recent record),
> *sorted* in descending order of total calories - how would I be able
> to do that? When I set up a typical portal, it seems to pull the data
> from the first record in the database; not the most recent (which
> contains the information I need).
>
> I'm using FM 5.5 -- it seems like there SHOULD be a way to accomplish
> this, but I'm drawing a blank!
>
> Chris
>
When creating your relation you have the option to sort related records. Hit
the button and select the field you want to sort on. You can then select up
or downward sorting.
Keep well, Ursus
Re: How to display most recent record in portal (?)
am 13.09.2007 14:31:11 von Lemur
On Sep 13, 7:21 am, "Ursus" wrote:
> "Lemur" schreef in berichtnews:1189647074.002529.235190@k79g2000hse.googlegroup s.com...
>
>
>
> > Hello,
>
> > I have a database that handles a slew of "running totals" (for
> > argument's sake, call it 'calories consumed').
>
> > Let's assume, in this database I have 8 people listed, and I have all
> > their calories for each meal during a week (21 in total).
>
> > If I want to have a portal that shows each of the 8 people, with the
> > total calories consumed (i.e., the total from the most recent record),
> > *sorted* in descending order of total calories - how would I be able
> > to do that? When I set up a typical portal, it seems to pull the data
> > from the first record in the database; not the most recent (which
> > contains the information I need).
>
> > I'm using FM 5.5 -- it seems like there SHOULD be a way to accomplish
> > this, but I'm drawing a blank!
>
> > Chris
>
> When creating your relation you have the option to sort related records. Hit
> the button and select the field you want to sort on. You can then select up
> or downward sorting.
>
> Keep well, Ursus
Hi Ursus,
I have done that, but with no luck. I now know why it's not working,
but I've no idea how to fix it. I need to go into more information
(and, give up the easier-to-understand 'calorie' analogy).
The database tracks scores in various games played. Each game has it's
own id#, and then, each person has his own id# (and name). So, to see
game1 / Bob, the id/name field would be 1Bob.
In addition, for the FIRST time someone has played a game, there's an
X-Field (which denotes their first playing). So, someone playing game
1 for the first time would have X1 with their record. Someone playing
game 2 for the first time would have X2, but someone who had played
previously, would just have "2."
I did this because I wanted to isolate records to be pulled into the
portal. Since the fields I want to display are all calculation/sum
fields, it didn't matter which record was selected, and it was easiest
to identify the 'first.'
The relationship I've set up is on the X/game id relation (so, in the
file with the portal, there're different records which pull related
records X1, X2, X3, X4, X5, etc. The relationship is the X/game id in
the portal file to the X/game id in the related file, and then, it's
sorted, descending, by the score.
The problem with that, is it's ONLY looking at the Xgameid, and only
if there's an X - so, it's restricted to the first time people have
played (which explains why my new scores are only being shown from the
first record someone has).
If I change it to JUST GameID::GameID, I can sort it by sequence,
descending, but, then, it displays ONLY from the last record (and not
from each person), for some reason.
What I need, I think, is to figure out a way to denote the most
*recent* record in the main file (maybe a reverse gameid/xfield) and
then, relate on that field to the portal. Otherwise, I don't know how
to get the information I'm looking to display to show up.
Chris
Re: How to display most recent record in portal (?)
am 13.09.2007 16:45:36 von Lemur
On Sep 13, 8:31 am, Lemur wrote:
> On Sep 13, 7:21 am, "Ursus" wrote:
>
>
>
> > "Lemur" schreef in berichtnews:1189647074.002529.235190@k79g2000hse.googlegroup s.com...
>
> > > Hello,
>
> > > I have a database that handles a slew of "running totals" (for
> > > argument's sake, call it 'calories consumed').
>
> > > Let's assume, in this database I have 8 people listed, and I have all
> > > their calories for each meal during a week (21 in total).
>
> > > If I want to have a portal that shows each of the 8 people, with the
> > > total calories consumed (i.e., the total from the most recent record),
> > > *sorted* in descending order of total calories - how would I be able
> > > to do that? When I set up a typical portal, it seems to pull the data
> > > from the first record in the database; not the most recent (which
> > > contains the information I need).
>
> > > I'm using FM 5.5 -- it seems like there SHOULD be a way to accomplish
> > > this, but I'm drawing a blank!
>
> > > Chris
>
> > When creating your relation you have the option to sort related records. Hit
> > the button and select the field you want to sort on. You can then select up
> > or downward sorting.
>
> > Keep well, Ursus
>
> Hi Ursus,
>
> I have done that, but with no luck. I now know why it's not working,
> but I've no idea how to fix it. I need to go into more information
> (and, give up the easier-to-understand 'calorie' analogy).
>
> The database tracks scores in various games played. Each game has it's
> own id#, and then, each person has his own id# (and name). So, to see
> game1 / Bob, the id/name field would be 1Bob.
>
> In addition, for the FIRST time someone has played a game, there's an
> X-Field (which denotes their first playing). So, someone playing game
> 1 for the first time would have X1 with their record. Someone playing
> game 2 for the first time would have X2, but someone who had played
> previously, would just have "2."
>
> I did this because I wanted to isolate records to be pulled into the
> portal. Since the fields I want to display are all calculation/sum
> fields, it didn't matter which record was selected, and it was easiest
> to identify the 'first.'
>
> The relationship I've set up is on the X/game id relation (so, in the
> file with the portal, there're different records which pull related
> records X1, X2, X3, X4, X5, etc. The relationship is the X/game id in
> the portal file to the X/game id in the related file, and then, it's
> sorted, descending, by the score.
>
> The problem with that, is it's ONLY looking at the Xgameid, and only
> if there's an X - so, it's restricted to the first time people have
> played (which explains why my new scores are only being shown from the
> first record someone has).
>
> If I change it to JUST GameID::GameID, I can sort it by sequence,
> descending, but, then, it displays ONLY from the last record (and not
> from each person), for some reason.
>
> What I need, I think, is to figure out a way to denote the most
> *recent* record in the main file (maybe a reverse gameid/xfield) and
> then, relate on that field to the portal. Otherwise, I don't know how
> to get the information I'm looking to display to show up.
>
> Chris
I was able to figure this out. As I mentioned, I needed to denote the
most *recent* record in the file. Once I did that, and changed the
relationship to search by that field, instead, I was able to get the
proper information to show up.
Thanks for all your help!
Chris