Making database edit use absolute id than index
directive working