Hide add action to prevent duplicate

I am able to prevent duplicate second entry in the same day by adding valid_if formula:

      ([_THISROW].[Date] = [Date]),
      ([_THISROW].[ID] <> [ID])

How to achieve the same purpose before opening the form by hiding add action button instead of the above situation when user filling the form with invalid value error message? I tried similar formula in the Only if this condition is true in Behavior, but do not work.

The “Only if this condition is true” condition in your action should work. If it isn’t working, please share the expression you used and the error message you got.