Jump to content

Sorting with zero width no-break space


This topic is 2577 days old. Please don't post here. Open a new topic instead.

Recommended Posts

In 13, we can custom sort using a field to hold the sort number and then text calculation like this:

If ( not Sort ; 
Name ; 
Substitute ( 10^Sort - 1 ; 9 ; Char ( 65279 ) )
)

Then we can set the calc field to Unicode (in storage), we can sort the field according to this sort order and if we set the value list to Reorder by Unicode, it too will sort by this Sort order.

 

We have a file which was created in 12 and this technique does not work in it.  I also tried Char ( 8203 ) but it does not even move the entry over at all so it simply does not seem to identify them, whether sorting the field (set to unicode) nor displaying the value list (set to unicode).

 

Does anyone have any ideas (hopefully zero-width), that might work?  Or at least looks better?  I know we could use spaces but that just doesn't look right.  Using Char(65279) was picked up from Soliant http://www.soliantconsulting.com/blog/2012/09/extending-filemaker-pro%E2%80%99s-value-list-sort-capabilities-using-char-function

 

edited - I was missing a parenthesis 

Edited by LaRetta
  • Like 1
Link to comment
Share on other sites

I don't get the question, ZERO WIDTH SPACE does not work for you?

Looks better? Why do you have to display this at all?

I would use a non visible field for such a sort.

Link to comment
Share on other sites

Hi, thanks for responding. 

 

No, it does not work in two independent files in our solution - both files were created in 12.0v1 and are now being served up with FMS 12.0v5.  When I add this functionality, it does not work in them but it DOES work in files created in 12.0v5 and 13.

 

The attached (created in 13) shows WHY I need it displayed; as I said, it is for a value list - a popup and we want the order in the popup to match the sort order specified and reordering the value list to Unicode makes it happen.  And if you also specify unicode in the field definition, you can then sort records by this same order.  No, this field does not need to be displayed for sorting the records but it DOES need to be displayed as popup.  

 

So I was looking for any other unicode character which is zero width that might work.  I've tried everything I can think of, including deleting the fields are recreating them. :-)

bom.fmp12.zip

Link to comment
Share on other sites

Have you tried all the ASCII control characters (1-32)? Some of those are definitely whitespace characters, but some may not take any space. I've seen some promising things with the group separator character Char ( 29 ) before.

Link to comment
Share on other sites

This topic is 2577 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.