Conditional property using query library

Hi all!

I'm trying to create a conditional property so that when submitting if that variable contains no value, then it should be excluded from the request.
Illustration below

Example with the image above.
The username field should not be part of the request if the variable contains empty string "" or null

1 Like

Hi @techieoriname, welcome to the community :wave:

You can use ternary operation in your keys instead of using static keys there. Example:

Key | Value
{{ !name ? "" : "name" }}  |  {{ !name? ? "" : name}}

Note that I use a string name for the falsy value in the Key field. Apply similar logic for the rest of the property for the request.

2 Likes