@chaley, thanks for your additional troubleshooting suggestions. Using 04.1f for all numbers does allow them to sort properly, so that takes that variable out of the equation. I'm using lina.w's final code, only tweaking the finish_formatting formula:
Code:
program:
sidx=field('series_index');
i=format_number(sidx, "{:02d}");
f=format_number(sidx, "{:04.1f}");
isInt=cmp(f, i, '', 'yes', '');
final_sidx=finish_formatting(
test(isInt, i, f),
'',
' [ ',
' ] '
);
# Add together the final result
strcat(
field('series'),
final_sidx,
field('title')
);
Ideally, I would be using
Code:
final_sidx=finish_formatting(
test(isInt, i, f),
'',
'',
': '
which would read
Series 02.5: Title