0% found this document useful (0 votes)
2 views8 pages

Employee Database Prompt

The document outlines the creation of a modern employee management system using Google Sheets, HTML Forms, and Google Apps Script. It details the structure of the spreadsheet, including tabs for data entry and validation, as well as the required functionalities for adding, updating, and viewing employee records. Additionally, it specifies the design requirements for the HTML form and the integration of file uploads and Google Drive storage for attachments.

Uploaded by

The Entertainer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views8 pages

Employee Database Prompt

The document outlines the creation of a modern employee management system using Google Sheets, HTML Forms, and Google Apps Script. It details the structure of the spreadsheet, including tabs for data entry and validation, as well as the required functionalities for adding, updating, and viewing employee records. Additionally, it specifies the design requirements for the HTML form and the integration of file uploads and Google Drive storage for attachments.

Uploaded by

The Entertainer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Employee Database System – Google

Sheets + Apps Script Integration


1. 📌 Objective
Build a modern, dynamic employee management system using Google Sheets, HTML Forms,
and Google Apps Script. Data will be stored in a tab called 'db' within the spreadsheet. Input
will be handled via an HTML form embedded through Google Apps Script. Files will be
stored in a dedicated Google Drive folder. Dropdown and multi-select fields will source data
from a tab called 'dv'.

2. 🧱 Spreadsheet Structure
Sheet Name: 'employee' – This spreadsheet contains 3 tabs:

- form: For button or UI launch

- db: Database of employee entries

- dv: Data validation list for dropdown/multiselect options

Tab: 'db' — Main Database Structure


Column Field Name Type Notes

A ID Auto-generated ID Unique
(5-char)

B Name Text

C Designation Dropdown Source: dv!A:A

D Department Dropdown Source: dv!B:B

E Present Address Google Map smart Type @ to search


address

F Permanent Address Google Map smart


address

G Phone Text

H Emergency Phone Text

I Email Email format


J Birth Date Date format

K Blood Group Dropdown Source: dv!C:C

L Father Name Text

M Mother Name Text

N Career Progression Multi-select Source: dv!C:C


dropdown

O Salary Track Text

P–V Attachments (CV, File uploads Stored as 'View' link


NID, etc.)

W Resignation Date Date

X Status Dropdown Source: dv!D:D

Y Timestamp Auto timestamp On add/update

Z User Email Auto-filled from


Session

3. 📋 HTML Form Requirements


General Layout

- Responsive and modern design (CSS/JS allowed)


- Full-width layout
- Searchable dropdowns and multi-select fields
- Inputs for all fields except ID, Timestamp, and User

Search Section

- Input: Search by Employee ID


- Icon/Button with placeholder “Search”

Buttons

- Add: Save new record


- Update: Update existing entry
- View: Show a preview with View links
4. ⚙️Functional Requirements (Script Logic)
Add Button

- Generates ID, Timestamp, User


- Creates folder in Drive (ID: 1eop0aevORfmCTpUblG9pa6Rq9TfYUlcY)
- Subfolder by employee Name
- File names: Name + Attachment Label
- Store file links as 'View'

Update Button

- Search by ID
- Load data into form
- On submission: update fields and replace attachments
- Update timestamp

View Button

- Opens styled report in new tab


- Show labels and links (e.g., View CV)

📂 Additional Notes
- All dropdown/multiselect values come from `dv` tab:
- dv!A:A → Designation
- dv!B:B → Department
- dv!C:C → Blood Group / Career Progression
- dv!D:D → Status
- Google Maps smart address enabled via @ mention
- User email fetched from Session.getActiveUser().getEmail()

🎯 TASK FOR AI
You are a professional Google Apps Script and HTML developer.

▶️Please write:
- Full Google Apps Script code for data handling, file upload, and automation
- A modern, full-width HTML + CSS + JS form with dropdowns, file preview, and script
integration

1. Objective
I am preparing a employee google spreadsheet, where I will basically creating a database,
and i will enter the data by the HTML forms inside google spreadsheet by script.

2. Data structure

Inside the google sheet named "employee", I have 2 tabs;

-"form"

-"db"

-"dv"

Here is the detailed data structure

(i) On the "form" tab, I have the following button:

-{ADD EMPLOYEE} - to assign the scripts there

(ii) On the "db" tab, I'll stored all the data, and has the column name:

Column A - "ID" - 5 chars auto generated unique id

Column B - "Name" - text field

Column C - "Designation" - this will be an option (dropdown) and the dropdown


options are stored in the same spreadsheet file but in a different worksheet called "dv" and
the column name is "Designation" in column A

Column D - "Department" - this will be an option (dropdown) and the dropdown


options are stored in the same spreadsheet file but in a different worksheet called "dv" and
the column name is "Department" in column B

Column E - "Present address" - Address integrate with google map like in the
spreadsheet if i type @ and then i can search location and can entry
Column F - "Permanent address" - Address integrate with google map like in the
spreadsheet if i type @ and then i can search location and can entry

Column G - "Phone" - text

Column H - "Emergency phone" - text

Column I - "Email" - email format

Column J - "Birth date" - date format

Column K - "Blood group" - this will be an option (dropdown) and the dropdown
options are stored in the same spreadsheet file but in a different worksheet called "dv" and
the column name is "Blood group" in column C

Column L - "Father name" - text format

Column M - "Mother name" - text format

Column N - "Career progression" - this field will have multiple option selection options
and the dropdown options are stored in the same spreadsheet file but in a different
worksheet called "dv" and the column name is "Designation" in column C

Column O - "Salary track" - text

Column P - "Appointment letter" - file attachment but the data will be saved in the sheet as
link named as "view"

Column Q - "Employment contract" - file attachment but the data will be saved in the sheet
as link named as "view"

Column R - "CV" - file attachment but the data will be saved in the sheet as link named as
"view"

Column S - "NID_Passport" - file attachment but the data will be saved in the sheet as link
named as "view"

Column T - "ID card" - file attachment but the data will be saved in the sheet as link named
as "view"

Column U - "Salary statement" - file attachment but the data will be saved in the sheet as
link named as "view"

Column V - "TIN certificate" - file attachment but the data will be saved in the sheet as link
named as "view"

Column W - "Resignation date" - date format


Column X - "Status" - this will be an option (dropdown) and the dropdown options are
stored in the same spreadsheet file but in a different worksheet called "dv" and the column
name is "Status" in column D

Column Y - "timestamp" - whenever user will add the data or update the data it will add the
date and time in this field.

Column Z - "user" - user is the current user who are logged in and who entry the data, his
email name or user will be automatically recorded there.

4. Form

The form will have all label and input mentioned in the data detailed data structure except
"ID","timestamp", and "user" as it will be generated automatically by the script.

There will be a search option in the top, where the user can search employee by their ID a
search icon behaving as a button will be there with the input field and the placeholder will
be "Search"

Then after the label and input field, there will be multiple button

"Add"

"Update"

"View"

Form has to be modernly designed (with CSS, JS if required) with the full width of the form.
and wherever we have dropdown options/multiple selection option in the input field, you
add a search option there so user can easily search and add it.

4. Function
"Add" button will trigger the function where the form will be saved in the sheet called "db"
and make sure after clicking the add button, you must have have to do this thing:

***Drive folder creation

{In this case i want my file attachment data should be stored in a google drive folder
called "employee_attachment" and the drive folder id is
"1eop0aevORfmCTpUblG9pa6Rq9TfYUlcY"

In here whenever a new employee will be created a new folder will be created by
the "Name" of the employee from the entry and all the attachment will be stored in that
specific folder. and the naming convention of the file inside the folder will be by the label
"Name" + attachment label.}

"Update" this function will interact with the search input field on the form, first the user will
search employee by their "ID" after clicking or enter the search icon, it'll retrieve the data
from the datasheet "db" and will show on the relevant input field on the form and there user
can edit the input field and after updating the field, when user will create the button
"Update" it'll update and save in the relevant row on the sheet "db". and if it is a file
attachment, make sure you remove the specific file and save the new one.

"View" this function will behave like as a pdf report where this will show all the value of the
current input field with label and attachment file will have the link e.g. "View CV" and will
open in a new blank tab

* ACT AS A PROFESSIONAL GOOGLE APPS SCRIPT AND HTML EXPERT.


* CAREFULLY ANALYZE THIS SCENARIO AND WRITE A FULLY WORKING GOOGLE APPS
SCRIPT CODE PLUS HTML CODE TO GENERATE THIS REPORT and FORM.

You might also like