Does anyone know if there's any way to rank roles in a search? I could do with a search which lists users and their most permissive role. Is there any way to do this without having to add custom fields?
l
Laura
03/19/2019, 1:00 PM
Perhaps create a Formula (numerical) column using CASE WHEN which assigns a value to each role, then adds those cumulative values? Just an idea, someone with more formula experience can chime in
💯 1
v
Vtor
03/19/2019, 1:13 PM
^ that's probably how i'd go about it too. assign each role a number in order from 1-x, where 1 is your highest, then sort by the Formula(Numeric) column
Vtor
03/19/2019, 1:15 PM
actually, if you end up sorting by more than 9, you may need to do it as Formula(Text) and prepend a 0 onto the number. when i tried to sort by numbers higher than 9, it would only sort by the 1st digit
Vtor
03/19/2019, 1:15 PM
here's an example of one i did based on price levels:
CASE {pricelevel}
WHEN 'Catalog Price' THEN '01 '
WHEN 'CAN Catalog Price' THEN '02 '
WHEN 'CAN EQP' THEN '03 '
WHEN 'CAN JAV' THEN '04 '
WHEN 'CAN JAV MARDI' THEN '05'
WHEN 'CAN MARDI' THEN '06 '
WHEN 'CAN Next Col EQP' THEN '07'
WHEN 'CAN Next Column' THEN '08'
WHEN 'CAN TOP FIVE' THEN '09'
WHEN 'EQP Price' THEN '10 '
WHEN 'EQP+5' THEN '11'
WHEN 'JAV Mardi Price' THEN '12'
WHEN 'JAV Price' THEN '13'
WHEN 'MARDI' THEN '14'
WHEN 'Next Col EQP' THEN '15'
WHEN 'Next Column' THEN '16'
WHEN 'PPP / Overruns' THEN '17'
WHEN 'Top Five Price' THEN '18'
WHEN 'Online Price' THEN '19' END
🔥 1
1000 1
d
Dominic B
03/19/2019, 1:38 PM
Thanks @Laura I'm well used to creative use of case statements in other searches, but didn't even think to do so in this case. A bit cumbersome, but it'll work.