Optional REST URL Parameters

I want to make a REST GET request where a parameter is optional. The parameter "recipient" is not always set, but the REST web service does not allow it to be empty. So far I have had no success in not submitting this parameter when the text field is empty.

image

image

When I dynamically compose the entire query string in {{...}}, the & and = characters are unfortunately escaped.

Does anyone know the problem and has found a solution?

Thank you!

Hi @hoiz,

You should be able to do this with some JS in the parameter name. Wrap 'recipient' like this:

{{ textInput246.value.length > 0 ? 'recipient' : null }}

If the length of the textInput is 0, then it won't include the recipient param.