Automatically translated.View original post

curd... appscript

# Web Site Writing Basics

# googledrive

# appscript

The CRUD system on Google Sheets is the idea of using Google Sheets as a database (Database) to manage 4 basic data. We do not have to open the Spreadsheet table to edit it directly, but through an application or other system. Instead, CRUD stands for: Create: Adding new data to the row of SheetRead: Retrieving data from Sheet to Display Update: Correcting the data already in SheetDelete: Removing data from Sheet How can we create a CRUD system on Google Sheets? Usually, Google Sheets is not a CRUD system in itself (if we type it directly, it's called regular fill-in), but we make it a CRUD system through these tools: Google Apps Script: Write a short JavaScript code to create an API. Connect AppSheet: Google's No-code tool that turns Sheet into a Mobile App instantly. Third-party Tools: Such as Make.com, Zapier, or using the REST API, connect to a web page (Frontend). What can be applied? With Google Sheets being easy to use and free, many people make it a backyard system for small to medium projects as follows: 1. Inventory Management Create: Scan the barcode to add new products Read: Czech how many items are left Update: Cut stock when selling out Delete: Remove discontinued items 2. Revenue-expenditure record or disbursement system in the company to make the employee fill out mobile payment details. Data will run directly into Sheet to make the account check and approve (Update Status) 3. The Booking System allows users to choose a date (Create) and can check the booking status (Read) or cancel / postpone the date (Update / Delete) themselves. Simple CRM uses records of customer lists, contacts, and job tracking status so that the cell team can view the same set of data in real-time advantages and limitations, advantages, limitations for free: no rent, expensive database, speed: If the data is huge (hundreds of thousands of rows), it is slow to start, easy to use: People can view the data through the Sheet page. Security: Not suitable for very Sensitive data. Easy to connect: There are various APIs. Concurrent Access: If many data are written simultaneously, there can be a jam.

2025/12/25 Edited to

... Read moreถ้าใครกำลังหา “การสร้างฟอร์มบันทึก/อัปเดต/ลบข้อมูลใน Google Sheet ด้วย Apps Script” เราว่าจุดที่ทำให้ทำงานได้จริงคือการวางโครงสร้างชีต + เขียนฟังก์ชัน CRUD ให้ชัดตั้งแต่แรก (ไม่งั้นพอโตขึ้นจะตามแก้ยากมาก) 1) เตรียม Google Sheet ให้เหมาะกับ CRUD - แนะนำให้มีชีตชื่อ Data เก็บข้อมูลจริง และชีตชื่อ Config (ถ้าต้องตั้งค่าเพิ่มเติม) - แถวหัวตาราง (Row 1) ควรกำหนดคอลัมน์ให้ชัด เช่น id, name, phone, createdAt, updatedAt, status - ให้มีคอลัมน์ id เป็น “คีย์หลัก” ห้ามซ้ำ เพื่อใช้ค้นหา/อัปเดต/ลบได้แม่นยำ (อย่าใช้เลขแถวเป็น id เพราะแถวเลื่อนแล้วจะเพี้ยน) 2) สร้างฟอร์มด้วย HTML Service (ใช้งานเหมือนหน้าเว็บ) ประสบการณ์ส่วนตัวคือทำฟอร์มแบบ HTML จะควบคุม UX ได้ง่ายกว่าพิมพ์ลงชีต เช่นมีช่องค้นหา id แล้วดึงข้อมูลมาเติมฟอร์มเพื่อแก้ไขต่อ แนวทางคือ - หน้า index.html มีฟอร์มกรอกข้อมูล + ตารางแสดงรายการ - ฝั่ง Apps Script ทำฟังก์ชัน doGet() เพื่อเปิดหน้าเว็บ - ใช้ google.script.run เรียกฟังก์ชัน create/read/update/delete จากฝั่งหน้าเว็บ 3) โครง CRUD พื้นฐาน (ใช้ SpreadsheetApp) - Create: รับค่าจากฟอร์ม แล้ว appendRow หรือ setValues ลงแถวถัดไป พร้อม createdAt - Read: ดึงข้อมูลทั้งตารางแล้ว map เป็น array/object ส่งกลับไปแสดงผล (หรือทำ read เฉพาะ id เพื่อเร็วขึ้น) - Update: ค้นหา id ให้เจอ “เลขแถวจริง” แล้ว setValues เฉพาะแถวนั้น พร้อม updatedAt - Delete: ค้นหา id แล้วลบทั้งแถว หรือเปลี่ยนสถานะเป็น deleted (แนะนำแบบ soft delete ถ้าข้อมูลสำคัญ) ทริกสำคัญ: เวลาค้นหา id อย่าไล่ทีละเซลล์ ให้ดึงทั้งช่วงเป็น values แล้วค่อยหา index จะเร็วกว่า เช่นอ่านคอลัมน์ id ทั้งคอลัมน์มาเป็น array แล้วหา indexOf 4) กันปัญหาพบบ่อยเวลาใช้งานจริง - ข้อมูลซ้ำ: ก่อน Create ให้เช็ก id ซ้ำในคอลัมน์ id ก่อนเสมอ - หลายคนกดบันทึกพร้อมกัน: ใช้ LockService.getDocumentLock() ครอบส่วนที่เขียนข้อมูล เพื่อกันชนกัน - ช่วงข้อมูลว่าง/มีหัวตาราง: เวลาอ่านข้อมูลให้ข้ามแถวหัวตาราง และกรองแถวว่างออก - ประสิทธิภาพ: ถ้าข้อมูลเริ่มเยอะ ให้ใช้ getLastRow() และอ่านเฉพาะช่วงที่มีข้อมูลจริง ไม่อ่านทั้งชีตแบบกว้างๆ 5) ไอเดียการแสดงผลเป็น “ตารางรายการ” เหมือนหลังบ้าน จาก OCR ที่เห็นเป็นวงจร CRUD + หน้ากรอกข้อมูลกับตารางแสดงผล เราแนะนำให้ทำตารางที่มีปุ่ม “แก้ไข/ลบ” ในแต่ละแถว - ปุ่มแก้ไข: ส่ง id ไปเรียก readById แล้วเติมค่ากลับเข้าฟอร์ม - ปุ่มลบ: ยืนยันก่อนลบ แล้วค่อยเรียก deleteById สุดท้าย ถ้าเริ่มจากโปรเจกต์เล็กๆ Google Sheets + Google Apps Script (SpreadsheetApp) เป็นตัวเลือกที่ทำ CRUD ได้ไวมาก แต่ให้คิดเรื่อง id, การล็อกตอนเขียนข้อมูล และการอ่านข้อมูลแบบประหยัดตั้งแต่แรก จะทำให้ระบบไม่พังตอนคนเริ่มใช้งานเยอะขึ้น

Related posts

Script Med💜
Peace ✌🏽 & Blessings
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

672 likes

Linked Universe Shifting Script Template Notion
#LinkedUniverse #LegendofZelda #realityshifting #notiontemplate #realityshiftingtemplate
ShiftingToTheFullest

ShiftingToTheFullest

13 likes

IMPEACH TRUMP - SCRIPT & NUMBER ⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️
I wrote this script to call my government reps and tell them i want trump impeached all i had to do is read it as written to my government representatives in my local district which is easy to look up or call the Washington office @ (202) 225-5546. In numbers we are strong. Script: “I am cal
Jeniel

Jeniel

509 likes

Land Your Next Job with this Script
This answer effectively showcases the candidate's enthusiasm for the role and company, their alignment with the company's values and goals, and their eagerness to apply their education and experiences. It demonstrates their understanding of how their skills and aspirations fit with the oppo
Gurvir Bains

Gurvir Bains

2124 likes

Script only 🥰
#script #journal #hobonichi
j o c e l y n🥂

j o c e l y n🥂

48 likes

A social media post from "Wealth Revival Credit Academy" by "Admin Emma Frakes" offering "FREE GAME On how to remove hard inquires from your credit in 48 hours," featuring a pointing finger and rocket emoji.
Script provided below 🥰
Phone Script for Disputing Unauthorized Hard Credit Inquiries Introduction: 1. Greeting: "Hello, my name is [Your Name], and I'm calling regarding my credit report." 2. Purpose: "I need to dispute several unauthorized hard inquiries that have appeared on my credit report."
Coi

Coi

51 likes

How to cold email recruiters on LinkedIn *script*
Hello everyone! Job market has been tough these days and I wanted to share tips on how you can cold email and reach out to recruiters during your job search. Make it personal by using their name, show interest in their company, and highlight your skills. Finish with a clear ask, like setting up a m
Yun Jung

Yun Jung

19 likes

A desk in an office cubicle with a laptop and coffee cup, featuring text overlay 'HOW TO ANSWER: WHY SHOULD WE HIRE YOU?' and 'script included!' to guide job interview responses.
A clean desk with a computer monitor, displaying 'KEYPOINTS' for interview answers: 'HIGHLIGHT YOUR UNIQUE SKILLS AND QUALITIES' and 'PROVIDE CONCRETE EXAMPLES THAT ARE RELEVANT', with an 'EXAMPLE' prompt.
A desk with a notebook, showing an 'EXAMPLE RESPONSE' for the 'Why should we hire you?' interview question. The text provides a template emphasizing technical expertise, interpersonal skills, and passion for the role.
How to answer “Why Hire You?” (Script Included!)
This question “why should we hire you” is a very frequent question that is asked during interviews, whether it is for internships or jobs. Being able to answer this question the right way will set you apart from other applicants. The only way to get better is to keep practicing, but don’t script it
dhillon.diary

dhillon.diary

1194 likes

Script med💜
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

35 likes

How to Read a Script in 3 Easy Steps
Hi! My name is Kimberly Yates, I’m a professional actor and acting coach to A-List talent. I’d love to chat with you! Comment down below 👇 #acting #actingcoach #learnontiktok #howto #fyp
Kimberly Yates

Kimberly Yates

6 likes

Salary Negotiation Script
Negotiating your salary is pretty important. It's not just about the paycheck; it's about ensuring you're fairly compensated for the work you do. Plus, it sets the tone for your future earnings and career growth. Think of it as advocating for yourself in a chill way—it's all about r
Gurvir Bains

Gurvir Bains

117 likes

A Bible page open to Matthew 5:39-45, with verses 44-45 highlighted in pink, emphasizing 'Love your enemies' and praying for those who persecute. Small heart doodles are drawn around the highlighted text, and a 'Lemon8' watermark is visible.
FAV SCRIPT 🌸
#bible #biblerecommendation #explore #fyp
SADE ✨

SADE ✨

233 likes

Script Lettering with RED INK 🩸
#tattoo #tattooartist #script #chicano #714
RockRollG

RockRollG

2167 likes

Manifestation 101 🖤How to script and manifest LOVE
ready to manifest love? Use scripting as a manifestation tool to get a clear vision of what you want (and don’t want), and more importantly, who is the version of you that is in a happy and healthy relationship. Manifestation is about having a vision and then embodying the version of you tha
Seppy ✨💖🌙

Seppy ✨💖🌙

16 likes

Script med💜
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

9 likes

How to prepare your Elevator Pitch *script include
Hi everyone! Crafting an elevator pitch might seem tough, but it's crucial for acing your next interview. Begin by introducing yourself briefly and showcasing your skills and experiences. Then, customize your pitch to fit the job and company, highlighting how you can help them succeed. Practice
Yun Jung

Yun Jung

10 likes

Script Med🍋💜🙏🏾
#fyp
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

36 likes

Script Med🍋💜🙏🏾
#fyp💗
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

31 likes

A person takes a mirror selfie in a restroom, with text overlays stating 'elevator pitch = KEY to land internships/jobs' and 'SWIPE for an example ->', emphasizing the importance of elevator pitches for career opportunities.
A laptop on a table with a city skyline background, displaying text defining an elevator pitch as a brief, compelling summary for the 'Tell Me About Yourself' interview question.
A laptop screen shows an example elevator pitch from 'Dhillon', detailing her marketing skills and career aspirations, with additional text advising to 'highlight your value' and 'always end with a call to action'.
how to craft perfect elevator pitch (w/ script)
The most common question you will get asked in interviews is "Tell me about yourself". Here is where your elevator pitch comes in handy. In this post, I help you understand what an elevator pitch is and give an example of one. It's something that takes time and practice but once you
dhillon.diary

dhillon.diary

8 likes

iPadOS 18: notes app smart script feature ✍🏼
I would definitely use this feature more if it was compatible with apps like Goodnotes, but it was still fun to play around with it and see how it refined my handwriting! Smart Script This feature refines your handwriting, making it smoother, straighter, and more legible. All you have to do is
Allie Marie 🧚🏻

Allie Marie 🧚🏻

137 likes

EXACT SCRIPT! How To Get Kids Off the TV calmly!
The exact script I use to get my kids off the TV. Real life. No bribes. No yelling. Step by step: 1️⃣ Say their name first. Get connection before correction. 2️⃣ Remind them how long they’ve been watching. 3️⃣ Have them repeat the script: “When I turn off the TV, I say thank you.”
Happy Hubbard’s

Happy Hubbard’s

1734 likes

A stylish woman in sunglasses and a white fluffy top, with text overlay "HOW TO SCRIPT YOUR DREAM LIFE (STEP-BY-STEP)" and "script the life you desire with clarity and confidence," introducing the topic.
Text "STEP 1 – REWIRE YOUR SELF-IDENTITY FIRST" with bullet points on self-image and limiting beliefs, set against a background of a person on a balcony watching a sunset over the ocean.
Text "STEP 2 – SHIFT FROM “WANTING” TO “EMBODYING”" explaining how to write with certainty and embodiment, overlaid on an image of a woman exercising on a Pilates reformer machine.
How to script your dream life step by step
Your words aren’t just descriptions—they’re commands to your reality. 💡 Scripting isn’t about wishful thinking—it’s about aligning your subconscious with your dream life. When you write with certainty, emotion, and clarity, you start moving differently, thinking differently, and making decisions
Luxury Mindset CEO

Luxury Mindset CEO

215 likes

Script Med💜🍋🙏🏾
#fyp
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

12 likes

The Man Who Can’t Be Moved - The Script (Cover)
I don’t think I ever got over how good this song is 😭 • • • • • #songwriter #tiktok #themanwhocantbemoved #thescript #cover
Kayla 🎤

Kayla 🎤

2 likes

Script Med💜
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

4 likes

LOVE SCRIPT 🥰✍️📝
#tarot #tarotreader #tarotreadersoflemon8 United States
Deshonna Bennett ✨Star Child✨

Deshonna Bennett ✨Star Child✨

3 likes

Script Med🙏🏾
#fyp
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

2 likes

A woman sits at a desk, looking at a laptop, with the text "WORK MEETING SCRIPTS" overlaid. The image promotes tips for leading meetings, featuring the Lemon8 logo and user handle @alex.careerqueen.
An overhead view of a desk with a laptop and keyboard, displaying meeting script phrases for "INTRODUCTION" and "AGENDA SETTING." The text provides examples like greeting attendees and setting discussion goals, with the Lemon8 logo and @alex.careerqueen.
A woman at a desk, looking at a laptop, with meeting script phrases for "PRESENTING" and "ENDING THE MEETING" overlaid. The text includes prompts for presenting ideas and summarizing next steps, featuring the Lemon8 logo and @alex.careerqueen.
Run a work meeting like a GIRLBOSS! ✨*script here*
Taking the lead on projects and meetings is a great way to grow your career! But, if you find yourself limited because you're intimidated by running a meeting or unsure of what you'd say—I got you! Here are some of my favorite phrases to keep a meeting moving with a cohesive flow. -
Alex | Career & Confidence

Alex | Career & Confidence

322 likes

Why should we hire you + SCRIPT INCLUDED
So, when you’re in that big interview and they ask, “Why should we hire you?” – this is your moment to shine! 🌟 you know that this question is coming— so make sure to PRACTICE it over and over again! Here’s why this answer is 💯: 1. It’s specific! You’re not just saying you’re great; you’re sh
Baki Izzat

Baki Izzat

169 likes

When the customer goes off script
When a customer goes off script so now everything is messed up. A day in customer service retail! #shop #shopping #clothing #clothes #retail #customerservice #customer #retailproblems #thrift #thrifted #shopsmall #chico #clothingrevivalchico #retailworker #retaillife
Clothing Revival

Clothing Revival

615 likes

Script Med. 💜
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

3 likes

A person's feet in white sneakers stand on asphalt with a yellow smiley face and a white arrow pointing right. The image features text about interview tips and how to answer "Why should we hire you?" with a "Swipe" prompt.
A person sits at a desk, viewed from behind, working on a computer displaying code. An overlay provides advice on how to approach the "Why should we hire you?" question, focusing on unique qualifications and relevant skills.
A close-up of a white keyboard, a black ball of yarn, and a notebook with a pen. An overlay presents a sample answer for the interview question "Why should we hire you?", highlighting experience, achievements, and skills.
Why should we hire you? - How to answer *script*
Hello everyone! When asked why you should be hired, focus on your unique strengths, experiences, and achievements that align with the role and company culture. Highlight your relevant skills and qualifications, emphasizing how you can contribute value and make a positive impact. Share examples of p
Yun Jung

Yun Jung

49 likes

A person writes in a notebook at a table with coffee, overlaid with text "LAND YOUR NEXT PROMOTION WITH THIS SCRIPT" and Lemon8 branding.
Text on a blurred desk background outlines key points for asking for a promotion: achievements, skills, and alignment with company goals, with Lemon8 branding.
A promotion request script is displayed over a blurred desk background, addressing a manager to discuss progress and a potential promotion, with Lemon8 branding.
Land Your Next Promotion with this Script
This script is effective because it clearly highlights your achievements, skills, and alignment with company goals, making a strong case for your promotion. It maintains a professional and respectful tone while requesting a dedicated time for discussion, demonstrating your seriousness and preparati
Gurvir Bains

Gurvir Bains

16 likes

Script Med🍋🙏🏾
#fyp
Warrior Princess (byGG)👑⚔️

Warrior Princess (byGG)👑⚔️

12 likes

A woman in a white dress and flower crown stands in a golden field under a blue sky. Overlayed text challenges viewers to counter negative thoughts with three positive ones to 'flip the script'.
Flip the Script
Challenge yourself today: Every time a negative thought creeps in, counter it with three positive ones. Train your mind to see the brighter side and watch how your perspective shifts. Let’s reframe our thoughts together! #MindsetShift #PositiveThinking #FlipTheScript #MentalWellness #SelfGr
Soulphoria

Soulphoria

117 likes

See more