Any way to clear a string without setting it to null?

Hello!

I have a tricky situation using a web request with optional query parameters.

One of my parameters is set by the user using a text edit field. If the user completely deletes the string themself everything works as expected since the variable has no value in Appfarm(undefined maybe?). If I try to set the string to null in an action the web request will send the parameter as null. Imagine the parameter is called myParameterString.

If the user presses backspace enough times before calling the API:

https://someurl.com/myAPImethod?parameter1=foo

If I clear the string with an update action before calling the API:

https://someurl.com/myAPImethod?parameter1=foo&myParameterString=null

This might be working as intended. But I need another way of clearing the string. Using a function with return ''; seems to be blocked by Appfarm. Is there any other workaround?

Hi,

There is no way to set a property back to undefined in Appfarm with an Update Object, since the return undefined output from a function is ignored (by design).

However, are you using query parameters in the web request action node for this?

In that case, you can use a function when assigning value to the query parameter:

That works perfectly, thank you!