I created a New Machine System under the newly added Machine and the code is working as per desired.
Now the FLAW is when I create a New Machine Sub System for the newly created Machine System i want to see only the new Machine Sub System not the other items.
You will get a clear picture by seeing the image. I want the population of only the Green highlighted box not the Red box.
I gave two DMax functions and criteria in the query which says the max ID of machine sub system must be equal to max ID of machine system.
But still it is not working. I just need one help to complete my project.