Fetch record and update same record without creating duplicate record.

Fetch record and update same record without creating duplicate record.

Hi zoho users and employees,

Ive created a timekeeping app for employees (users) to log hours during a specified pay period. In this application, I am working towards creating a dropdown that would act as lookup to the same forms records. Once the pay period is selected, a fetch command would be used to autofill the subform "Tasks and Hours" based on the criteria that zoho.currentuser = input.Name and payperiod = input.pay period ie.(fetchx  =  Timesheet  [(Name == input.Name && Pay_Period == input.Pay_Period)];)

Ultimately, I would like for employees to only see the "timesheet" form. The dropdown Pay period would act as the only way for them to see previous and current pay period records. For example, the employee would log in and go to the timesheet form. They would then select the pay period they would like to log hours for (via subform "tasks and hours"). A fetch command would be used to gather data from previously recored records based on the criteria User and Pay period. 
If no record has been submitted for this criteria, then a new record would be created for that specific pay period and user. However, if a record has been submitted previously and meets this criteria (the user has already input hours for the pay period and created a record), then that specific record would be brought up for edit. Im worried that if I create an autofill script using fetch to gather data from records, then the data may be duplicated instead of updated.
To simplify,
If user and pay period combination has NOT been used before: create a new record.
If user and pay period combination has been used before: fetch specific record and related data, allow for user to edit this record, then update the record without creating a duplicate. 

Ive attached a screenshot of the timesheet form.

Please let me know of any questions regarding the application or if you need me to clarify anything.
I appreciate any help you all can give me on this problem.

Thanks
Cory R