Visibility Condition Works, but Action Condition Fails


In this screenshot, I have set the Action Condition so that the button is clickable only when the ‘Company Name’ field is not empty.
bug2.mov [video-to-gif output image]
Here, despite entering a value in the ‘Company Name’ field, the Action Condition does not work as expected, and the button remains clickable.

bug3
This screenshot shows that I have applied the same condition for the Visibility Condition: the button should only be visible when the ‘Company Name’ field is not empty.
bug4.mov [video-to-gif output image]
In this final screenshot, the Visibility Condition works correctly: as soon as I enter a value in the ‘Company Name’ field, the button disappears.

Issue: Inconsistent Behavior Between Action and Visibility Conditions

Hi Glide Team,

I’m experiencing an issue with the Action Condition and Visibility Condition in my app.

Issue Description

I’ve set the exact same conditions for both Action Condition and Visibility Condition on a button in my app. The Visibility Condition works perfectly, showing or hiding the button based on the defined condition.

However, the Action Condition, which should prevent the button from being clickable when the condition is met, does not seem to work. The button remains clickable even when the condition is active.

Steps to Reproduce

  1. Create a button and set identical conditions for both Action Condition and Visibility Condition.
  2. Test the app:
    • The button disappears when the Visibility Condition is active (as expected).
    • The button does not become unclickable when the Action Condition is active (unexpected behavior).

Expected Behavior

The Action Condition should make the button unclickable, just like the Visibility Condition makes the button disappear.

Actual Behavior

The button remains clickable despite the Action Condition being met.

Additional Information

I’ve tested this with multiple buttons and conditions, and the issue persists. It seems like there might be an inconsistency or bug in how these conditions are handled.

Any help or insight would be greatly appreciated!

Thank you in advance.

Best regards,
Antoine TROOVY

It works the exact opposite… if the condition is met then the button IS clickable.

I don’t think it’s a bug… it sounds like it’s working as expected.

One thing to be mindful of, especially inside of a form, is that some things will be looking a the row of the item that opened the form, and some things will look at the values on the screen.

Your visibility conditions could be looking at the value inside the form, but the action condition may be looking at the parent row where the button was located to open the form (maybe the first row in the table, which already has a company name filled).

It’s not always immediately clear if you are working with screen values or parent row values.

Point being, that your action condition may be looking at a value from a different existing row. Does the action condition offer the ability to look at Screen Values?

2 Likes

I always assume that form values input in an entry field on a native form (via a form screen therefore) are in an entrance hatch and not yet in a table, and therefore cannot be worked with for visibility conditions, filtering, sorting, actions, computed columns.

As Jeff pointed, this is not entirely true. It seems that visibility conditions will work with in-form data screen values and action conditions might not?

Simplistic perhaps, but to err on the safe side:

Native forum: can’t work with form values until they are submitted.
Custom forum: form values can be worked with as soon as they are input.

I don’t have an exhausted list of what works and what doesn’t work, but some calculated columns like relations, on the destination table, can be used for visibility conditions in a native form, but the same setup doesn’t work for an edit form. I tried this for preventing duplicated email records.

2 Likes

I forgot to show on the video, but the “Success” notification appear even when nothing is written in the field.

I think this is the point, the action condition is looking at a different exisiting row, not the screen value. Yes the visiblity condition works with screen value. But how can I fix that ?

(I tried this in a “Add item” form)

If it’s the way it behaves then for now, you’d best stick with visibility conditions if you still use native forms. For action conditions, you would want to switch to a custom form.

1 Like