An error occurred while saving the commentAnonymous commented
If it helps anyone I achieved this with the following code:
In my case I'm using a dropdown field. Based on what the user selects I have (5) options that I want to sort and used a switch to enter the either a,b,c,d,e into a "Sorting" field that is hidden in the form.
The second part of the code updates the sorting field should the user update the entry.
Once you display the DataTable with the "Sorting" field you'll need to use CSS to hide the column.