Empty value conditions

I got trouble setting “if empty value” conditions in both AC and SC.

In app connect for example, I want to show an element using a dynamic attribute only when a certain database field (checked with data binding) is empty or has an empty value or string. I can’t get that to work using operations like bound_field_value!="",bound_field_value!=null, etc. What’s the right way to achieve this?

Secondly, in a serverconnect script I want to check if a dropzone/upload field input value is not empty as a condition for steps to be executed. The condition value I set is $_POST.upload_image, but it seems not to work. Also tried $_POST.upload_image.name, but that also doesn’t work.

Thanks for any help with this.

Well just use: !bound_field_value to check if the field is empty/doesn’t have a value.

Are you working with a single upload field or multi file upload?

Awesome, will try that!

Single upload field in this case.

Then you can just check if the upload input returns a name, like that:

I tried that before and just again, but that doesn’t seem to work:

image

What server model are you using?

NodeJS

Also tried this one, but that doesn’t work either:
image

For the serverside expression on NodeJS maybe @patrick can check this.
As for the app connect expression not working - are you sure your binding returns no data? Maybe check your server action reply in the browser console.

Okay, thanks.

For the app connect part: That’s a fault on my end, the fields contained the image path by default and weren’t empty, so sorry for that one :nerd_face:

1 Like