Getting down to brass tacks, there are ‘Cost Centers’ from which an employee chooses while making an expense, like materials, labor payment, transport, foods and hotels etc etc. The cost centers are kept in a separate table, and is referenced into the expense table. There are certain cost centers which are used very often, like purchases and labor payments.
What I want is to automatically assemble the cost center list according to the frequency of the values that are being used. The most used ones are to be on the top. That makes it easier for people to choose from.
Is there any Appsheet way of doing it, rather than manually assembling and sorting every one of them?
Solved! Go to Solution.
Here’s again my brains wired up in the right direction after I posted the request:
COUNT(select(User expense submissions[Cost Center], [Cost Center]=[_THISROW].[Cost center Name]))
orderby(filter(“Cost Centers”, (IN(any(Profile Slice[Role]), [Available to:]))), [Count of cost centers], TRUE)
The IN() statement is to filter the availability of cost centers according to the user role.
N.B. Potential solution seekers, TRUE is necessary in the expression of orderby if you want to sort in descending order. Orderby orders the list in ascending order by default.
User | Count |
---|---|
37 | |
30 | |
29 | |
20 | |
18 |