Averaging all field values in a single library entry to provide aggregate rating as entry status

105 views
Skip to first unread message

Mat Welch

unread,
Jun 15, 2020, 10:12:56 AM6/15/20
to mementodatabase
For each entry in the database, I have a large number of factors that are being rated and expressed/recorded as star ratings. I'd like to be able to calculate the overall star rating from multiple measured attributes and display a total average rating for each library entry. I see how to aggregate across entries in a library, but not how to generate a broad average of rated fields for each library entry

Can someone please help?

For example let say I was rating staff performance..

Staff member - friendliness - efficiency- communication - presentation
John                   5                      2                    1                      3                    
Pete                    5                     5                     5                     5
Carol                   1                     1                     1                      2
Sue                    5                      2                    2                       2

I'd like to have an overall star rating for each staff member that I can display as an entry status.

Many thanks!


Many thanks

Ernst Moser

unread,
Jun 15, 2020, 1:49:30 PM6/15/20
to mementodatabase
Hallo
Mann könnte ein einen Berechnungsfeld alle Punkte summieren und durch die Anzahl divitiren. Damit bekommt man eine Zahl . Diese in Sterne zuwandel wird schwiriger .

Hi
One could sum up all the points in a calculation field and divide by the number. This gives you a number. This turning into stars becomes more difficult.

Gilles Mons

unread,
Jun 15, 2020, 2:58:50 PM6/15/20
to Mat Welch, mementodatabase
Hello,
create a trigger script and enter the script:

var e = entry(),
v1 = e.field("Val 1"),
v2 = e.field("Val 1"),
v3 = e.field("Val 1"),
v4 = e.field("Val 1"),
v5 = e.field("Val 1"),
vx = e.field("Average...");

e.set("Average Star",vx);


It works .... see photo
Gilles Mons

--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/9098d476-017a-4b0f-82d1-74c8a6c7633do%40googlegroups.com.
Screenshot_20200615_205737_com.luckydroid.droidbase.jpg

Gilles Mons

unread,
Jun 15, 2020, 3:00:54 PM6/15/20
to Mat Welch, mementodatabase
But not correctly....

Le lun. 15 juin 2020 à 16:12, Mat Welch <mdw...@gmail.com> a écrit :
--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mementodatabase/9098d476-017a-4b0f-82d1-74c8a6c7633do%40googlegroups.com.
Gilles Mons
Screenshot_20200615_205959_com.luckydroid.droidbase.jpg

Gilles Mons

unread,
Jun 15, 2020, 3:04:15 PM6/15/20
to Mat Welch, mementodatabase
....

Gilles Mons

Le lun. 15 juin 2020 à 16:12, Mat Welch <mdw...@gmail.com> a écrit :
--
Screenshot_20200615_210323_com.luckydroid.droidbase.jpg

Mat Welch

unread,
Jun 15, 2020, 9:32:08 PM6/15/20
to mementodatabase
Great thanks I'll give it a go. 

Gilles Mons

unread,
Jun 16, 2020, 11:41:51 AM6/16/20
to Mat Welch, mementodatabase
Retour in script...

var e = entry(),
v1 = e.field("Val 1"),

v2 = e.field("Val 2"),
v3 = e.field("Val 3"),
v4 = e.field("Val 4"),
v5 = e.field("Val 5"),

Vx =  (v1+v2+v3+v4+v5)/5;

e.set("Average Star",vx);

// Or
//vx = e.field(
"Average..Calcul");

//e.set("Average Star",vx);


Sorry..


Gilles Mons

--
You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mementodataba...@googlegroups.com.

Magali Godfroid

unread,
Aug 2, 2025, 11:38:23 AM8/2/25
to mementodatabase
Hello ! 
I'm sorry to come back with this explanation but I can't do the same :-( I always have an error. (I'm really bad at programmation)

Could someone share me database with an example, please ? I'll really appreciate.

Bill Crews

unread,
Aug 4, 2025, 6:19:22 PM8/4/25
to Magali Godfroid, mementodatabase
It's always helpful to indicate what what the error was and when it occurs. The error message, if there was one, would be great. Good luck. 


Reply all
Reply to author
Forward
0 new messages