You are viewing limited content. For full access, please sign in.

Question

Question

Sorting by Dollar Amount

asked on August 5, 2020

We have workflows combining documents to be emailed out. The supervisors want the documents in a certain order, to match the cover pages of the bundle. 

Example: Page 1 Cover Page,  Pages 2-unlimited are the documentation, the last page is a detail balance page. The documentation pages need to be sorted by dollar amount, low to high. 

In other workflows I have accomplished this by the naming convention and it pulls perfectly in order. The problem with this one is it does not sort properly by dollar amount. $102.65 will come before $68.75, because you know 1 is lower than 6. Any thoughts?

0 0

Answer

SELECTED ANSWER
replied on August 5, 2020

Once you have the $ sign in there, those strings are considered text not numbers, so they sort in alphabetical order. You can use pattern matching to strip out the dollar sign and then re-sort them as numbers.

0 0
replied on August 5, 2020

I have tried both with and without the dollar sign in the naming convention.

2020-08-05_9-44-07.png
0 0
replied on August 5, 2020 Show version history

Oh, you mean in the repository. Laserfiche clients only sort alphabetically. You would have to pad the numbers with leading zeros to the same length.

Workflow can do that with token formatting, if seeing documents named 000062.82, 000123.58, 013456.85 is acceptable to you.

0 0
replied on August 5, 2020

That would work for us. I tried following the online help. but is is dropping the leading zeros. What tokens would I put in formatting

0 0
replied on August 5, 2020

Could you post a screenshot of where you're doing the formatting? It should be in the activity that creates or renames these documents.

0 0
replied on August 6, 2020

Here you go

2020-08-06_15-06-43.png
0 0
replied on August 6, 2020

That looks like regular expression. For formatting, you want to #s for the digits you want before the decimal point and use 0s to indicate how many digits you want after the decimal point. So, something like ######.00

Or ###,###.00 if you want to get fancy and add the thousands separator for readability.

0 0
replied on August 6, 2020

That came back how it normally is. Does not have leading zeros to make all numbers 5 digits then the period and 2 more digits. 

0 0
replied on August 6, 2020

Try using zeros instead of the # sign. Although I don't think you can get the fancy comma.

 

2 0
replied on August 7, 2020

Perfect. The zeros did it. I did not think of trying that

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.