Skip to content

feat: parse Insert from URL script step#192

Merged
bc-m merged 1 commit into
mainfrom
fix/insert-from-url-191
May 29, 2026
Merged

feat: parse Insert from URL script step#192
bc-m merged 1 commit into
mainfrom
fix/insert-from-url-191

Conversation

@bc-m
Copy link
Copy Markdown
Owner

@bc-m bc-m commented May 29, 2026

Summary

Fixes #191.

The "Insert from URL" step (id 160) wraps its URL parameter in
<Parameter type="URL"><URL autoEncode="…"><Calculation>…. There was no
handler for the URL parameter type, so the step rendered a
⚠️ PARAMETER "URL" NOT PARSED ⚠️ placeholder and dropped the URL calc.

This adds a dedicated insert_from_url step module (mirroring insert_text),
dispatched from sanitizer.rs, and registers InsertFromURL = 160 in the
ScriptStep enum.

Rendering

Fields are emitted in FileMaker's option order:

Insert from URL [ Select ; With dialog: OFF ; Target: $response ; URL: $url ; Verify SSL Certificates ; cURL options: $curlOptions ]
  • URL is parsed from the doubly-nested <Calculation> and rendered as URL: <calc>.
  • cURL options (the trailing type="Calculation") is prefixed with cURL options:.
  • Select and Verify SSL Certificates are shown by name only when enabled, omitted when off. These are keyed by parameter id (4096 / 268435456), so the behavior also holds for localized exports (e.g. Auswahl, SSL-Zertifikate verifizieren).
  • Verify SSL Certificates is repositioned to just before cURL options.
  • The autoEncode attribute is intentionally not surfaced.

Test plan

  • New unit tests in insert_from_url.rs (empty URL, full step, Select/Verify off)
  • cargo test — 118 passing
  • cargo clippy --all-targets clean, cargo fmt applied
  • Snapshots regenerated; every changed line verified to be an Insert from URL step (English + German fixtures), nothing else touched

🤖 Generated with Claude Code

Add a dedicated handler for the "Insert from URL" step (id 160), whose
URL parameter is wrapped in <Parameter type="URL"><URL autoEncode><Calculation>
and was previously rendered as a "PARAMETER NOT PARSED" placeholder.

The step is now rendered in FileMaker's option order: Select, With dialog,
Target, URL, Verify SSL Certificates, cURL options. Select and Verify SSL
Certificates are shown by name only when enabled (keyed by parameter id, so
this also holds for localized exports), and the trailing cURL calculation is
prefixed with "cURL options:".

Fixes #191

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bc-m bc-m force-pushed the fix/insert-from-url-191 branch from 15ffb3e to 6294b34 Compare May 29, 2026 08:20
@bc-m bc-m merged commit 240c493 into main May 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Insert from URL: URL parameter wrapper not parsed (FM 22)

1 participant