Validate in editable grid

Certified Senior Developer

validations: if(
            items: ri!grid,
            expression: count(
            ) > 1
          "Only one fav can be selected",

Hello All,

I have an editable grid with multiple rows.

I have fav button on each row. I need to validate only one fav is allowed per user. How can I achieve this pls.

Here validation is not working. All my grid data is coming from ri and saving back to ri.

  Discussion posts and replies are publicly visible