Good evening! Trying to solve an issue with ranking a list of items displayed in a repeating group, but with the rankings restricted to identifying “First,” “Second,” and “Third” with only one item per ranking option (can’t have two first places). I’m using a dropdown with the options pulled from an option set. My initial plan is to add the items to a custom state list on the RG (with a workflow) and requiring all 3 options to be identified before saving a final response.
My issue is how to handle changes - so someone changes their response for a given item from “First” to “Second,” for example, in that cell’s dropdown. How can I remove the previous item from the custom state list (First) before adding the new response (Second)? Is there an easier way to handle this that I’m missing? Thanks so much.
Moving items around a list is tough and requires the individual pieces of that list to be “broken up” depending on how/where you are moving an item.
With the heavy use of custom states - I have been able to take a saved list of things and manipulate it to move a single item up/down, and by drag and drop to a specific spot, each have their own quirks and pattern on how those “pieces” are put back together.
Are your “list of items” actual things that are already saved to your database at this point? That was crucial for me, creating lists of state values can be tough, and then changing those posed some other challenges.
Will each response just be a list of things and then you will rank them based on their order from there?
Can you assign a permanent “ranking” to this DB item and just change its “ranking” via workflow?
Saving the temporary list as a state makes sense based on what you have explained. If you are not going to have a long list to assign ranks to a button on each items row for 1st,2nd, 3rd might work and you can save that state in an element in the specific rows of the RG.
If setting up everything from scratch is not appealing you can check out Keiths KW List Shifter Plugin that does require some learning but it is possible.
Thanks so much for the reply. For my application, there will be a team of users each casting votes (selecting a top three) on a short list of items (no more than 10-15). When the top three are finalized for a user’s vote, a workflow will add the points assigned for each place to the items behind the scene and revealed later. So, the assignment of the top three rankings has to be assigned temporarily on the front end before the tally workflow. So this should be a custom state, but I can’t figure out how to remove an item from the custom state list based on the previous dropdown value (if a user changes a vote for an item from second to first, the second is dropped from the list while the first is added). Thanks again.
I think you’re close - but there may be another way to use states to do this, just a couple more things to ponder!
Does EVERY item in that short list get a ranking in this process or is it only top 3?
Could you do a separate custom state for each “place” - and each of those would be of the same type as the list of thing (10-15 items you referenced)? You could then just run the workflow for those specific items - Are you trying to run a workflow for the “nth” item in a list?
It sounds like you’re not actually “removing” anything from the original shortlist of items, is that true?
Thanks again, trying to work through the multiple custom states idea (one for each place), which seems like a good one. I’m only ranking 3 items out of the entire list, and not removing anything from the list shown in the RG as votes are cast. The workflow to tally the items would take place after all three selections are made. My problem still seems to boil down to how to remove an item from a custom state list based on a current dropdown choice (when it’s clicked, but before it’s actually changed). I tried creating a group with the dropdown and using two workflows (one to clear the relevant state when the group is clicked, and one to add the state when the dropdown in changed). No dice - the group click is ignored in favor of the dropdown click (which are mechanically the same click). Still trying… thanks again.