Forum Academy Marketplace Showcase Pricing Features

Set ranks to a repeating group and assign the rank to an element that is outside of the repeating group

Hi!

As you can see in the image, I have a voting system where users can vote for academic institutions. I am displaying the top 3 academic institutions (the ones with more votes) in a repeating group, sorted by vote count, descending.

However, if the institution that the user selects on the dropdown is not in the top 3, I want it to be displayed below the repeating group, including what would be its index number according to its vote count.

I also need to assign the same index number to the items in the repeating group that have the same vote count. So EAFIT and University Z should both have index number “2” since they are tied in the second place.

You can see the image for more detail.

Any ideas of how can I do this? Thanks in advance.

Hi @fcastillosa.apps You can try this

On the index number text you make this:
RG(original) list of universities
:items until
Search for (universities) name = Dropdown university name
(sort by vote)
count
count

Hope it works

1 Like

Jose, thanks for the help. I tried but it is not working. Am I doing it right?

Yes and now just finalize with Count and again count

1 Like

Hey! I’ve been trying the whole day and couldn’t make it work. I tried what you said as well, did I do it right?

Untitled3

I also need to assign the same index number to the items in the repeating group that have the same vote count. So EAFIT and University Z should both have index number “2” since they are tied in the second place.

OK, so I think you are going to need to change your approach and NOT use the index number because the index number is going to always be sequential (i.e. 1,2,3,4,5). You can’t have duplicate numbers for ties.

1 Like

I agree, I have tried to do it also but I’ve been stuck for several days. It seems like a simple thing to do. However I have not been able to find a way. Basically what I need it is just sorting the institutions by vote count and generate a number that tells in what position each institution is according to its vote count (1st, 2nd, etc), but no idea how to it. Do you have any idea? @robert

OK, here’s how you do it.

Default value = Current Cell’s Index

Conditional Value = When Search for Institutions:Count>1
[set condition: votes = Current Cell’s Institution’sVotes]

Text: Seach for Institutions:Count+1
[set condition: votes > Current Cell’s Institution’sVotes]

1 Like

@robert! Thank you very much, the repeating group part is now working as I wanted!
The part that I can’t do yet is mirroring the corresponding index number to the institution that is outside of the repeating group (please see the image for a clear example):

Untitled4

The red circled “University outside of the repeating group” should show index number 5 since that is its index number according to the vote count. I just want the user to be able to see the position of the institution that he selected in the drop down when it is not in the top 5 institutions exposed in the repeating group.

I would appreciate any help with this as well, thank you again!

I think you could use the same (or similar) conditional logic and ‘do a search for’ with the same constraints.

1 Like

Here is how to do it.

1 Like

@robert ohh I didn’t noticed before but it is actually not working properly yet :unamused:, as you can see on the first video that you sent (min 0:13), the rank number is jumping from 3 to 5, skipping 4th rank. :unamused: :unamused: anyways, I think we are very close to solve it!

Update: I added to this reply the exact minute of the video were you can see the error happening

This is how placing is supposed to work. If there are three tied for 3rd place, the next one is in 6th place…at least that’s what I thought you wanted.

Now if you want it to function differently, where for example, Orange would be in 4th place regardless of how many ties there are in 1st, 2nd and 3rd above it, you would need to tweak the formula somehow. Off the top of my head, I’m not sure how it would be done, but there is probably a way.

Thats ok, I’ll keep trying to work it out! Thanks again!