Get the next option in the option set's order attribute

Hello, I’m having a hard time with the logic of this. I have ranks which people can earn, so I have the ranks in an option set, and one of the attributes is order. If someone is “Expert”, and I want to list what their next rank would be how would I do this?

I was thinking, Get Option > All Option > filter those options > Current Users Rank’s order + 1, but it keeps asking me for more input, and I was hoping I could just say Display so it show the next rank, but that’s not an option. What am I doing wrong?

2 Likes

Constraint: Current User's Society_rank's Order + 1 is This Society Rank's Order
or
Constraint: This Society Rank's Order - 1 is Current User's Society Rank

Either will work (I just tested both and they both do the same job).

Thank you, I’ve tried both, and I’m still getting red. The first one I got the filter to work, but then the main input was red. I tried adding :first item to see if it would fix it, but did not workk either. I’m just having a hard time with the logic of this, since the way I would expect it to be written is not working. The second one the Filter was still red.

In the filter (in the image) you’re missing ‘Order’ from the expression (that’s why it’s still red).

In terms of your actual text box, it needs to evaluate to a text, so you need to put :first item Display in he text box to make it work.

Thank you! I don’t know why this has been so challenging for me. It’s working now.

Next I’m going to try and do some calculations to make a progress bar. I have certain points and requirements to achieve the next rank I’m trying to get it to display.

First I want a progress bar which will show how many points they currently have to the total required points which are listed as an attribute for each rank.

Then I want to check on other status to indicate if they’ve been met yet. For example needing to be a member for 2 years. So it would need to look at how many years they’ve been a member which is stored in a Membership Data type, it might have to do some adding up if they have multiple records if membership was not continuous. compare that to the Option Set’s Rank’s Years Required attribute and come back with a yes or no. Haha. Wish me luck. Again, Thank you.

1 Like

Maybe you could help with this. I’m making great progress thanks to your advice. Now I’m trying to do a condition on the icon which is looking at the Current Date - membership start to find out how many days they were a member. Then divide this by 365 to get the years. Then if that is > the required years for the rank. Issue is it won’t let me put >. In the image it has “is” but I’ve tried to look for “>” instead of “is” but it won’t give me that option. All that worked for the text, but I want to set a condition on the icon to change to a green check mark if the condition is met.

You’re using ‘formatted as’ on the final number, which turns the number into a text. so you won’t be able to do any further mathematical manipulation once you’ve turned that value into a text.

So get rid of that ‘formatted as’ (I’m guessing you probably want to use ‘rounded to’ here instead anyway) and you should be able to continue working with a ‘number’ and have access to ‘>’.

Although, perhaps a simpler way to do what you’re trying to do would simply to check if the Membership start date is older than 2 years (i.e. the membership start date, plus 2 years, is less than the current date).

For that you can use: Membership Start Date + (years): 2 < Current Date/Time

(Although if you need to add up discontinuous membership periods that won’t work)

Ahh, yes that makes sense. Thank you. I prefer the simple ways, but often make things harder for myself, so I appreciate the simpler way.

1 Like

OK, these keep getting more challenging(at least for me).

Trying to calculate years of completed leadership positions. I have a Data type for People_involved. I’m doing a search for that data type.
Membership=current user
Leadership_position isn’t empty (focus on leadership involvement)
Date_term_end < current date (to get only finished term)

Now I have my list. I now need to go through each item and do a term_end minus term_start to figure out how many years it is. Then I need to take those numbers for each item in the list and add them all up.

No idea how I would do a calculation of fields in a list, but once I have those numbers I imagine I could just do a sum?

@adamhholmes I’ve been spending the last few days on this one, and not have any luck. I appreciate your help, and I don’t want to take to much more of your generous time. I was wondering if you could help point me in the right direction on my last message.

Probably the easiest way to do this without any plugins is simply to have a number field on the Peopl_Involved datatype for ‘Length Of Term’ and set that when you set the Date_Term_End field. Then all you need to do is sum that field on the list of People_Involveds.

Alternatively, there may be some plugins that will allow you to work on the date from within a list.

Hello @adamhholmes, thank you. I was also thinking of that as a workaround. I was just wondering if there was another way to do it.

Again, thank you for your help.