Tables not sorting in numerical order

Tables not sorting in numerical order

Anonymous
Not applicable
989 Views
11 Replies
Message 1 of 12

Tables not sorting in numerical order

Anonymous
Not applicable

I'm trying to sort a table in numerical order but the sort operation puts all of the 2 digit numbers beginning with one before 2 eg 1,10,11,12,2 etc

 

In the attached image there are no headers 1-5 so I'd like to see HD6 to HD12 in ascending order

 

Looking online I can see that this issue normally happens when performing a sort operation on a string as opposed to a number but wondered if there's a workflow that I'm missing?

 

Table numerical sort.JPG

kelly.young has embedded your image for clarity.

0 Likes
990 Views
11 Replies
Replies (11)
Message 2 of 12

Anonymous
Not applicable
The only way I know you can accomplish this is to pad the single digit HD numbers with leading zeros. The HD makes it a string field so that is how strings sort.
0 Likes
Message 3 of 12

johnsonshiue
Community Manager
Community Manager

Hi! The snapshot your provided shows you are on an older Inventor release (2017 or older). On 2018, you can sort by numerical order or string order.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 4 of 12

yooko1987
Participant
Participant

Hi

 

Is possible to use Ilogic to sort it numerically?

 

thanks!

 

BR

Yang

0 Likes
Message 5 of 12

johnsonshiue
Community Manager
Community Manager

Hi! Could you tell me what release you are on? On Inventor 2018, it can be done via an option. I am not sure if you can sort y by using iLogic. You might need extensive code to do that.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 6 of 12

Anonymous
Not applicable

Thanks for all the input ... I think I was running 2016 when I created this post, I've since migrated to 2018.3 and having seen the recent replies tried opening a cable drawing and checking out the new 'sort by string' option but the functionality appears to be no different than 2016 as can be seen from the 2018 screenshot below:

Table numerical sort_2.JPG

Is the sort by string option somewhere other than in the edit table dialogue?

 

Thanks

 

 

0 Likes
Message 7 of 12

mcgyvr
Consultant
Consultant

@Anonymous wrote:

Thanks for all the input ... I think I was running 2016 when I created this post, I've since migrated to 2018.3 and having seen the recent replies tried opening a cable drawing and checking out the new 'sort by string' option but the functionality appears to be no different than 2016 as can be seen from the 2018 screenshot below:

Table numerical sort_2.JPG

Is the sort by string option somewhere other than in the edit table dialogue?

 

Thanks

 

 


@Anonymous  Where/how specifically are you accessing that screen 

From the normal parts list and bill of materials sections this option is available..

You seem to be somewhere different..  Edit: Nevermind... I see you are just in a "generic table" as such they have NOT implemented the ability to sort numerically or by string on those types of tables.. Only bill of materials and parts list tables

https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/Inventor-WhatsNew/files/GUID-91FE816D-96DB-47B7-808E-5988BA5BD139-htm.html



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 8 of 12

yooko1987
Participant
Participant

Hi,

 

I'm still using 2017 version, therefore I wonder if it is possible to use ilogic. In addition, I don't know if I want to sort table by 'description', which has both number and alphabetic letters, e.g. 'plate 150x60x7', is it possible to sort the item after letters and then numbers? as I understand, the 'numerical' option will recognize the description which has both number and letters just as 'string', am I right?

 

Thanks!

Yang

0 Likes
Message 9 of 12

mcgyvr
Consultant
Consultant

@yooko1987 wrote:

Hi,

 

I'm still using 2017 version, therefore I wonder if it is possible to use ilogic. In addition, I don't know if I want to sort table by 'description', which has both number and alphabetic letters, e.g. 'plate 150x60x7', is it possible to sort the item after letters and then numbers? as I understand, the 'numerical' option will recognize the description which has both number and letters just as 'string', am I right?

 

Thanks!

Yang


@yooko1987 

If it were me and I had 2017 I would simply accept the sort order that the version of the program provides you versus complicating matters with custom programming. Table sort order is really not that important in the long run.. Whats important is just that people can follow the table and do their job whatever the sort order may be.  

 

If you would like to continue pursuing having someone write some code for you then I'd suggest you create a new post in the Inventor Customization forum where someone can help you develop the scope and provide some code based on that specified process/sort order requirements you fully define.  



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 10 of 12

yooko1987
Participant
Participant

@mcgyvr 

Hi and thanks. I will try in the customization forum.

 

I admit it's probably easier just accept the functions in 2017, and manually sort if need, and it may be not important for most of cases. But I just explain a bit why I'm pursuing it. in some production drawing it may has over 100 parts, and the detail views of each part are made ideally and often with POS number ascending (e.g. 1, 2, 3, 4), and to me it's habit to put similar plate together, and with logical order (e.g. dimension descending). In fact it's also easier and clearer to read and check, for different people e.g. workers, designers or purchasers. 

 

anyway, thanks for your quick response!

 

Yang

Message 11 of 12

yooko1987
Participant
Participant

Which link is to the customization forum?

0 Likes
Message 12 of 12

mcgyvr
Consultant
Consultant

@yooko1987 wrote:

Which link is to the customization forum?


@yooko1987 

https://forums.autodesk.com/t5/inventor-customization/bd-p/120

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes