Generate auto increment pack num - onclick trigger event - app studio

image
when Part type = Job Subcontract
than created new custom field for subcontractor
image
when click on create packing pack num will generate automatic (auto increment) pack num which trigger i can use for it ?
Please help…


created trigger event for app open - used slide out

i want to create new pack num based on last pack num, so what is the value in ?for that ?
please help