I’m working on an application that enables “giving circles” for a community, simulating a hybrid vehicle that borrows from the dynamics of both an endowment fund and a directed trust. The goal is to create a perpetual “community-directed giving pool” that directs gifts to beneficiaries identified by contributors.
One of the features of this tool will enable contributors to identify and cluster potential grant/gift recipients into categories of benefit (environmental, scientific, charitable, etc.)
On to the question…
I have a form that allows contributors to categorize a beneficiary (somewhat similar to creating a review).
Right now, the green banner (at the top) with focus category is set manually. Is there a way to identify which entries appear the most in an array, and set a column contents to a value in the entry? Using these submissions, I want to be able to identify the highest aligned category and have a column that changes when one category may overtake another.
This is what the back-end looks like. You can see that the beneficiary on the bottom row has two categorizations as “environmental” so I would want the “category” column to match the output of that function.
It doesn’t handle ties though (say there are 2 or more categories with the same max occurrence). If you want that to be handled we can change the code a bit.
That’s also helpful to know. I’m expecting this feature to be used on a daily basis, so I don’t expect ties to occur too often, but it would be something to address in the future. Would the code error, show two values, or just keep one - likely the preceding value?
Thinh, you saved me many hours of time! Thank you!
Generally, I would be interested in getting your feedback and advisory eye on the app and our architecture. Do you mind if I reach out over PM to discuss potential support?