kind of. Assuming your param is allowing for multiple values then your formula is sequentially checking in the order of the formula not the array to see if that value exists. If it does it returns that value and then stops....
if {?SortField}='NAME' then {CUSTMER_HDW.NAME}
else if {?SortField}='ADDRESS' then {SPECFAC_HDW.ADDRESS}
else if {?SortField}='DETAILS' then {SPECFAC_HDW.DETAILS}
...
so if NAME was selected at all in the param array it will sort on name.
YOu can allow a user to sort on mulltiple fields in another way.
Just create 3 params ('primary sort', 'secondary sort' and 'tertiary sort')that do NOT allow for multiple values all with the selecy option of the 3 types.
create 3 formual fields to 'convert' the params just like you did for 1.
in your sort expert add all 3 formula fields in descending order.
Primary isus with this way is that unless youa re running 2008 your users will have to input a value in all 3 params as optional params are not allowed.