Sort by change which field asc/desc selection

I have a dropdown to sort a repeating group by Price, rating

Price i would like descending to be no
rating i would like descending to be yes

Not sure how I can do this when theres only 1 descending field and the dynamic field name is the dropdown’s value

Make the descending value dynamic (i.e. dropdown's value is Rating)

Thanks a lot :slight_smile: