# Insert From URL with Spaces in Variable

**URL:** <https://the.fmsoup.org/t/insert-from-url-with-spaces-in-variable/5391>\
**Category:** Lounge (Discussions)\
**Tags:** curl\
**Created:** [April 26, 2026, 12:46pm UTC](https://the.fmsoup.org/t/insert-from-url-with-spaces-in-variable/5391 "2026-04-26T12:46:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)\
**Post date:** [April 26, 2026, 12:46pm UTC](https://the.fmsoup.org/t/insert-from-url-with-spaces-in-variable/5391/1 "2026-04-26T12:46:19Z")

</div>

I used “Insert From URL” and the WooCommerce API to edit a product on my website. The response header included a 400 error and a reference to a “control character error.”

Troubleshooting revealed the culprit was spaces in the “short\_description” variable string.

An internet search revealed, “To use a FileMaker variable that contains spaces (such as a JSON object) in a cURL request, you must **use the @ symbol prefix inside the cURL options string**. This tells FileMaker to treat the variable as a data source rather than trying to parse its contents as part of the command line, which automatically resolves issues with spaces and special characters.”

I use custom functions to build my curl options. In this case, I edited the -data curl custom function to add an @ prefix to the $variable name in an attempt to resolve the issue. However, this failed.

My second attempt was to append “@$” to the variable name (without the “$”).

\_cURL\_data\_fn ( “variablename”)

This was successful and eliminated the 400 error. I’m curious about why the first attempt (adding the @ prefix) failed.

---

<div class="post-metadata">

**Author:** ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)\
**Post date:** [April 26, 2026, 12:50pm UTC](https://the.fmsoup.org/t/insert-from-url-with-spaces-in-variable/5391/2 "2026-04-26T12:50:51Z")

</div>

The editor changed my “second attempt” — My second attempt was to append “@$” to the variable name (without the “$”).

---

<div class="post-metadata">

**Author:** ![steve\_ssh](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steve_ssh/32/160_2.png) [@steve\_ssh](https://the.fmsoup.org/u/steve_ssh)\
**Post date:** [April 27, 2026, 3:50am UTC](https://the.fmsoup.org/t/insert-from-url-with-spaces-in-variable/5391/3 "2026-04-27T03:50:53Z")

</div>

> [@steverichter](#):
>
> My second attempt was to append “@$” to the variable name (without the “$”).

If I understand correctly, this second attempt looks like it was probably the proper/expected format, e.g.,

` --data @$my_variable`

or

` --data @$$my_variable`

If the first attempt to use a **$variable** with the `--data` option did not include both the **@** symbol and the **$** symbol before the variable name, then I would not have expected it to work.

I'll note, however, that I am not entirely confident that I have understood the above post accurately.

---

<div class="post-metadata">

**Author:** ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)\
**Post date:** [April 27, 2026, 12:48pm UTC](https://the.fmsoup.org/t/insert-from-url-with-spaces-in-variable/5391/4 "2026-04-27T12:48:29Z")

</div>

> [@steve\_ssh](#):
>
> --data @$my\_variable

Sorry for not being clear. Both attempts should have produced the result above. I’ll have to take a look at the custom function to see how it’s treating the variablename parameter.
