How to i set the default value for input field?

I have a input field bound to data variable. how do i set default value for the input field to return 0 if user key in nothing?

Hi,

You can try using a formula as the input’s value:
IF(BOOLEAN(data.myDataVariable), data.myDataVariable, 0)

thanks for the reply. but not working. now it become “this binding requires an inversible formula.”

The issue here is that the input field value cannot be a formula as if the user types in something it cannot do set the value according to the formula again.

Instead what you could do is where you do the “Set data variable”, I assume you do it after a “Get record” flow. So inside the “Set data variable” in the value do the “Custom object” binding type and set the individual properties to the specific properties of the “Get record” flow output. Also there you can use the formula mentioned above by Vili with a little modification.

IF(BOOLEAN(outputs["Get record"].record.specificProperty), outputs["Get record"].record.specificProperty), 0)

Here you can set the properties to basically all different binding types:

Hope this helps. And keep in mind, that input field value property should always be a page/app/data variable, or its property.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.