I'm sure this was answered previously.

Created an index on the number of votes.
Create a field for the ordinal position he finished (1, 2, 3, 4, 5.. or 
alternately (more difficult) first, second, third)
Create a report based on the index.


N=1
Insert N into Ordinal field.
N=N+1.. rinse repeat till end of file.


Now alternately, if you wanted this field to update all the time (don't have to 
manually run report), you could create a subpanel based off the index.  You 
would also need a cascade trigger on the master panel.

ie.,   Master Panel records has an data link to the subpanel.   Something like 
"VotesChanged" Y/N.  Which links to all subpnel records.  When the record 
changes, it would trigger a recalc on the ordinal numbering.

More or less, ralph's book had a section on this, iirc. Conceptually it is 
similary to line items on an order.    He used a recursive link to increment 
the ordinal number.

Chris


________________________________
From: Dataperf <[email protected]> on behalf of Tim Rude 
<[email protected]>
Sent: Thursday, April 13, 2017 5:47 PM
To: [email protected]
Subject: Re: [Dataperf] Is there a better way of doing this?

Assuming you want the position displayed as a field on their record, I think 
(given that you're dealing with historic info that isn't going to change) I'd 
consider creating a non-user-editable field on that panel and then I'd create a 
report that populates that field for each record. Run the report once and all 
of the records are updated. If you add new historic records, run the report 
again. Maybe not as spiffy as having the field update on the fly, but seems 
like it could be easier to implement.

On 4/13/2017 10:45 AM, Don Friedman wrote:
I have a panel with the vote counts of a handful of candidates from past 
elections entered and a total of the votes cast with a computed field telling 
me what each candidate's percentage of the vote was in that particular 
district. What I'm looking for is a way to indicate what each candidate's 
position was in the race in that district - someone came in first, second, 
third, and etc.

I am envisioning writing very long formulas to accomplish this but am wondering 
if anyone can think of a better way of getting there.

Thanks.




Don Friedman
ProfessionalRecords.Com LLC
PRS Data Systems
205 S Main Street
Pittsburgh, PA   15215
1-800-PRS-FILE
412-784-1615 Fax
412-400-3881 Cell/Text




_______________________________________________
Dataperf mailing list
[email protected]<mailto:[email protected]>
http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf


_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf

Reply via email to