How to sort content in dropdown menu

I am working on a use case as follows. There are 4 machines per production line, and there are 2 production lines, i.e 8 machines in total. And there is a page which shows all the maintenance logs of a particular machine and on click of a file icon on top right(In blue) a page pop’s up to enter additional details to a particular log of that machine(To be selected form a drop down). and the same can be viewed on click of the file icon under comments column respectively. Here i face an issue on entering a comment for that particular log, i have to select to which log i am entering these comments but to choose it gives me a list of logs entered to all machines. I want the list to be particular to that machine.  This is the page which shows logs particular to a machine. On click of blue file the a popup page opens where we add comments.   And this is the popup where i have to enter comments per log Here in the drop down it gives me a list of all the logs of all the machines and production lines. I want this drop down to show logs of the machine selected.   Comments entity is being used for the popup page.  Any help and suggestions are appreciated. Thanks!    
2 answers

I would do a two step approach – in 1st step you could select appropriate log and in 2nd you will create a new comment to it.

With one step (page) with your current model  it could looks like this:



P.S: Try to use best practices for naming ( like camel case, using singular, not using underscore..., otherwise everyone will get lost in your code.


have you try this one