Hi Karthik,
You can accomplish by using two more attributes.
SampleID (the attribute that is the ID) - string
Autonumber( attribute that will generate the number) - autonumber
You can setup a before commit event on the entity and use a change activity to set the value of "SampleID" to however you want it to be
$Entity/_Type + toString($Entity/AutoNumber)
Here is the link to the event handler documentation
https://docs.mendix.com/refguide/event-handlers
yes it is possible.
I suggest that you take a look at the rapid developer path and the advanced module about microflow expressions.
Those will give you a good start.