I’m displaying a List of Users in a repeating group. I want to sort the list in a way in which the Users that the Current User is following appear at the top.
Each User in my app has a List of Users they follow, called “Following.” I am displaying another List of Users elsewhere in the app, but if the Current User follows any of the Users on this list, I want them to appear at the top.
I do not want to use two repeating groups for this. How would you sort this?
Thanks, but I don’t want to merge the lists. Consider the following:
List 1: List of Users that will be at event
List 2: List of Users that Current User follows
I’m viewing List 1 only. However, if there are Users that are in List 2 that are also in List 1, I want them to appear at the top of the list.
Then merge three lists, and here’s your constraint for the first list:
Do a search for Follows where Followee is in (Do a search for Users at an event)
You can also structure the expression the other way but it’s likely better to use the expression with fewer results as the constraint.
Then your current list 1 and 2 expressions are straight forward.
Maybe I’m missing the point, but not understanding where “sorting” is involved in this.
There is no sorting, the lists are merged in order.
X merged with Y merged with Z = XYZ.
So, put the results you want first in X, the results you want second in Y, and the results you want third in Z, where X/Y/Z are lists of Things.
1 Like
That makes sense! Sorry, learning how those lists will be merged is a key factor I didn’t pick up quickly. Appreciate it!
1 Like
system
Closed
8
This topic was automatically closed after 70 days. New replies are no longer allowed.