UpperBoundary
WinXp V8.5 advanced
In my database I have a field that holds a single number. It is not a
serial, so any given number can be used more then once. I want to know what
the highest number is I currently have used. Preferably a calculated field.
I have created a custom function to do this, but this keeps returning the
last entered value, which just might be 1. I know I could just sort on this
field, but this is not very intuitive. Also I could create a relationship
and then use the list function, but this also returns the values in the
order they were entered. Something like the MAX function, but then within
the current table.
Keep well, Ursus
Re: UpperBoundary
In article <46b46fbc$0$62231$dbd4b001 [at] news.wanadoo.nl>
"Ursus"<ursus.kirk [at] wanadoo.nl> wrote:
> WinXp V8.5 advanced
> In my database I have a field that holds a single number. It is not
> a serial, so any given number can be used more then once. I want to
> know what the highest number is I currently have used. Preferably a
> calculated field. I have created a custom function to do this, but
> this keeps returning the last entered value, which just might be 1. I
> know I could just sort on this field, but this is not very intuitive.
> Also I could create a relationship and then use the list function,
> but this also returns the values in the order they were entered.
> Something like the MAX function, but then within the current table.
> Keep well, Ursus
In a new TO of the current table, set a Cartesian relationship (the X
symbol, all records match all records) to the same field in the
original TO.
Your calc would then be Max ( TO2::YourField )
Matt
--
Free FileMaker Technique Demos: http://www.VirtualVermont.com/FMP
My Custom Functions: http://www.briandunning.com/filemaker-custom-functions/resul ts.php?keyword=wills
Re: UpperBoundary
>
> In a new TO of the current table, set a Cartesian relationship (the X
> symbol, all records match all records) to the same field in the
> original TO.
>
> Your calc would then be Max ( TO2::YourField )
>
> Matt
>
> --
Yeah, I suspected a relation was needed. I initialy wanted to avoid a new
relation, because this solution already is swamped by them.
Thanks for your reply anyway.
Keep well, Ursus
Re: UpperBoundary
In article <46b5eaaf$0$79681$dbd41001 [at] news.wanadoo.nl>, "Ursus"
<ursus.kirk [at] wanadoo.nl> wrote:
> >
> > In a new TO of the current table, set a Cartesian relationship (the X
> > symbol, all records match all records) to the same field in the
> > original TO.
> >
> > Your calc would then be Max ( TO2::YourField )
>
> Yeah, I suspected a relation was needed. I initialy wanted to avoid a new
> relation, because this solution already is swamped by them.
>
> Thanks for your reply anyway.
>
> Keep well, Ursus
Well, to avoid a Relationship you can use a Summary field instead, but
I don't know what the speed penalty may be of this method versus the
Relationship one.
Create a new Text field with an Auto-Enter data value of "Include Me".
You'll have to also put this value into the field for any existing
records).
ie.
AllRecords Text, Auto-enter value: "Include Me"
Create a new Summary field that is the maximum of the required number
field.
ie.
sum_MaxValue Summary: Maximum of MyNumField
Lastly, create a Calculation field that uses the Get Summary function
to retrieve this value for all the records (by using the constant value
in the AllRecords field as the sort / break field).
eg.
calc_MaxValue Calculation, Number Result, Unstored
= GetSummary (sum_MaxValue, AllRecords)
Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)