[object Object]

← back to Dw Photo Capture

docs: precise 2-step FileMaker setup (create web_print_request field + Web Sticker Poller script) — Data API can't create schema/scripts; server pre-staged to activate on field creation. Includes Mac-side AppleScript-watcher alternative.

8d68c8e675a44e7f0fafbbb310a08b1a2e0a82cf · 2026-07-06 18:23:45 -0700 · Steve Abrams

Files touched

Diff

commit 8d68c8e675a44e7f0fafbbb310a08b1a2e0a82cf
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon Jul 6 18:23:45 2026 -0700

    docs: precise 2-step FileMaker setup (create web_print_request field + Web Sticker Poller script) — Data API can't create schema/scripts; server pre-staged to activate on field creation. Includes Mac-side AppleScript-watcher alternative.
---
 FILEMAKER-STICKER-SETUP.md | 100 ++++++++++++++++++++++++---------------------
 1 file changed, 53 insertions(+), 47 deletions(-)

diff --git a/FILEMAKER-STICKER-SETUP.md b/FILEMAKER-STICKER-SETUP.md
index 43c5342..4a84e07 100644
--- a/FILEMAKER-STICKER-SETUP.md
+++ b/FILEMAKER-STICKER-SETUP.md
@@ -1,58 +1,64 @@
-# FileMaker Sticker Workflow — the 3 steps YOU own (Steve)
+# FileMaker Sticker — your 2 manual steps (copy-paste exact)
 
-The scanner side is LIVE: scan a sample → it identifies the item against the unified catalog →
-finds the open sample request in FileMaker (`today for client` filled + `Date Sample Request
-printed for vendor` filled + `Date WP Sample Sent` empty) → shows the popup with the client +
-**Print SKU / Print address** buttons. Pressing a button currently returns a safe **dry-run**.
+The scanner side is LIVE and already stamps `Date WP Sample Sent` = today when you press Print.
+These two steps add the **physical Zebra print**. They must be done in FileMaker Pro (the Data API
+can't create fields or scripts). Takes ~2 minutes.
 
-To make the physical Zebra print + date-stamp fire, three things live on YOUR side (FileMaker Pro
-can't be scripted via the cloud API, so these are manual one-time):
+--------------------------------------------------------------------------------
+## STEP 1 — add the flag field  (~30 sec)
+FileMaker Pro → **File ▸ Manage ▸ Database… ▸ Fields tab** → select the table behind
+`Sample Requests via email` (the `WALLPAPER` table) →
+- **Field Name:** `web_print_request`
+- **Type:** Text
+- click **Create**, then **OK**.
 
-## 1. Add a flag field the scanner writes
-On the `WALLPAPER` table (the one behind `Sample Requests via email`), add a **Text** field, e.g.
-`web_print_request`. The scanner writes `"sku"` or `"address"` into it for the matched record.
+Then tell me "field created" and I set `FM_PRINT_FLAG_FIELD=web_print_request` on the server
+(1 command) — after that the Print button writes `sku`/`address` into it for the scanned record.
 
-Then on Kamatera, set two env vars and restart:
-```
-FM_PRINT_FLAG_FIELD=web_print_request
-FM_WRITE=1          # lets /api/print-sticker actually write the flag (until then: dry-run)
-```
-(Leave `FM_WRITE` unset to keep everything in preview mode.)
+--------------------------------------------------------------------------------
+## STEP 2 — add the poller script  (~90 sec)
+FileMaker Pro → **Scripts ▸ Script Workspace ▸ New Script**, name it `Web Sticker Poller`,
+paste these steps (adjust the two `Perform Script` names to YOUR existing print/stamp scripts):
 
-## 2. Add ONE poller script in FileMaker Pro (reuses your existing print + stamp scripts)
-Create a script `Web Sticker Poller` with `Install OnTimer Script` (interval ~4s) on an open
-window (a "Sticker Station" window). Steps:
 ```
-Enter Find Mode
-  Set Field [ web_print_request ; "sku" ]          // (or an OR-find for "sku" | "address")
-Perform Find
+# Web Sticker Poller  — run via Install OnTimer on an open "Sticker Station" window
+Enter Find Mode [ Pause: Off ]
+  Set Field [ WALLPAPER::web_print_request ; "*" ]     # any non-empty flag
+Perform Find [ ]
 If [ Get(FoundCount) > 0 ]
-  Go to Record [ First ]
+  Go to Record/Request/Page [ First ]
   Loop
-    # run YOUR existing scripts for this record:
-    Perform Script [ "Print Sample Sticker (<size>)" ]   // your existing Zebra print script
-    Perform Script [ "today for client / stamp WP sent" ]// your existing stamp script → Date WP Sample Sent = today
-    Set Field [ web_print_request ; "" ]                 // clear the flag so it doesn't reprint
-    Commit Records
-    Go to Record [ Next ; Exit after last ]
+    # branch on the flag value to pick the sticker size:
+    If [ WALLPAPER::web_print_request = "address" ]
+      Perform Script [ "PRINT ADDRESS STICKER" ]       # <-- your existing address-label script
+    Else
+      Perform Script [ "PRINT SKU STICKER" ]           # <-- your existing SKU/Zebra label script
+    End If
+    # your print script already stamps Date WP Sample Sent = today; if not, uncomment:
+    # Set Field [ WALLPAPER::Date WP Sample Sent ; Get(CurrentDate) ]
+    Set Field [ WALLPAPER::web_print_request ; "" ]    # clear so it doesn't reprint
+    Commit Records/Requests [ No dialog ]
+    Go to Record/Request/Page [ Next ; Exit after last ]
   End Loop
 End If
 ```
-Branch on the flag value (`"sku"` vs `"address"`) to pick the SKU-sticker vs address-sticker
-layout. Keep the "Sticker Station" window open on the Mac attached to the Zebra printer.
-
-## 3. Confirm the field mapping (already wired, just verify)
-- Match: `combo sku` (house) == identified `internal_sku`, else `Mfr Pattern` begins-with the mfr code.
-- Qualify: `today for client` filled, `Date Sample Request printed for vendor` filled, `Date WP
-  Sample Sent` EMPTY; most-recent by `today for client`.
-- Stamp on print: `Date WP Sample Sent` = today (done by YOUR stamp script in the poller).
-
-## Fallback (zero scripting)
-Skip the OnTimer poller: make a "Samples to send" layout showing the found set where
-`web_print_request` is not empty, and click your existing print button per row on the Mac.
-
-## Test
-1. `FM_WRITE=1` + `FM_PRINT_FLAG_FIELD=web_print_request` on the box, restart dwphoto.
-2. Scan a sample with an open request (e.g. Maya50162 → Haley McKinley, record 536653).
-3. Popup → Print SKU → the flag lands on the record → your poller prints the Zebra label and
-   stamps `Date WP Sample Sent` = today → flag clears.
+
+Then a tiny **`Start Sticker Station`** script that arms it (run once when you sit down to send samples):
+```
+Install OnTimer Script [ "Web Sticker Poller" ; Interval: 4 ]
+```
+Open a window on any layout of the WALLPAPER table, run `Start Sticker Station`, and leave it open
+on the Mac attached to the Zebra. It'll print + clear each flagged record every 4s.
+
+--------------------------------------------------------------------------------
+## What I do (once STEP 1 is done)
+- Set `FM_PRINT_FLAG_FIELD=web_print_request` on Kamatera + restart (1 command).
+- Verify end-to-end: scan → popup → Print → confirm the flag lands on the record (I can read it back)
+  and `Date WP Sample Sent` stamps today.
+
+## Alternative if you don't want a FileMaker script
+If your Zebra Mac stays open, I can instead build a tiny Mac-side watcher (launchd + AppleScript
+`tell application "FileMaker Pro" to do script "<your print script>"`) that polls the flag and fires
+your existing print script — no new FileMaker script needed. Tell me your print script's exact name
+and which Mac has the Zebra, and I'll build that instead.
+```

← 5e67458 5x: report — desktop + mobile Chrome PASS (0 console errors)  ·  back to Dw Photo Capture  ·  feat: Option B — Mac-side sticker watcher (use both). sticke 11691f4 →