I'm essentially wanting to implement a custom sort order. I have a list of items with a 'Status' choice column. The status choices are 'New Item', 'Funded', and 'Pending'. In my query, I'd like to order my data so that all items with a status of 'New Item' are grouped together and displayed first, then all 'Pending' items, then all 'Funded' items. I obviously cannot use basic asc or desc orderby functionality but I'm hoping there's a way to do this. I read about 'precedence grouping' here but unfortunately it is still a filter and not an 'orderby' query option. I'd really appreciate any insight that you may have! Thanks!
Just Throwing down my options
I am thinking the easier option would be to create a calculated column in SharePoint based on the Status field that specifies the order you want.
New Item = 0 , Pending = 1
Now, use your existing REST API Query to have ASC on the Calculated Column
Send in Separate REST API Call for each status and display them.
You can have a additional column - Single line of text / calculated coloum which stores numerical value for each status value e.g. New Item will have 1 , Funded will be have 2 and so on.
Further the REST API will return results based on the numerical value.