Sorting issue with Repeating Group

Hello Everybody,

I come to you because I would like your help on an issue I have in my app :

I created a form to test your compatibility with EV. In the result page, I rank the users, and then I show in an RG the vehicles corresponding with the ranking, sorted by autonomy.

I would also like to show first the vehicles corresponding to the car category the user is (aka compact, berline, suv, …) or add a filter option.

My problem is : when you sort the RP by car category, how can I get first a category (which is a variable) ?
Ex : the user has SUV car, so I want to sort the RP group data starting with SUV, and not berline or Compact.

Thanks

Hi there, @audric… your post reminded me of this thread…

I’m not sure if the question in the thread is exactly the same as what you are trying to do, but it sounded similar enough to me that the thread might be able to get you down a good path.

Hope this helps.

Best…
Mike

Hello Mikeloc,

Thanks for your response. It’s not exactly the same problem but interesting yet, I will have a look and test the solutions mentioned.

I am thinking that the best solution would be to separate in 2 different RG, but I thought that maybe It was possible to do it only in one. Will see.

Audric

EDIT : I tried this solution provided in the thread and it worked for me :

1 Like

This seems to me like you should filter the results by the type of car the user has so that the RG only shows SUV and no other type…however your use case may be different from what I would think and for some reason

What is EV?

What is autonomy in association with vehicles? Like self driving cars? I am confused because of what autonomy means generally; the right to self governance.

If what you are trying to do is sort the cars based on the results of a users compatibility test results , so that cars that are more compatible to them are shown highest, you need to in your database have some ranking stored on the car for each type of result of your form for finding the users compatibility. That would require a lot more thought into a database structure and a way of ranking each type of car based on the possible results of the quiz.

If you put up screen shots and a link to your editor it would help make things clearer in regards to what you are actually trying to achieve so it would be easier to trouble shoot your issue.

In the meantime you check this post I put up a while back on how to sort and filter search results as well as check out various other threads on the topic of sorting and filtering and perhaps database structure.

Hello @boston85719,

Thank you very much for your response. EV is for electrical vehicule :slight_smile: And so on autonomy is the autonomy of a car with full charge (in km / miles).

I actually put a ranking for each car, and based on the ranking of the user, I show different cars in the RG.

I finaly find my solution with the merge of two lists. :wink:

Audric

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.