when select yes, turn to "no" other values in related records

Antonio_L_Ferre_0-1710251683560.png

How can I make it so that when I select an image as a "favorite", the rest of the related images become "not favorites", since I only want there to be ONE "favorite" within the same container?

0 3 52
3 REPLIES 3

Could you update what type of the column [Favorite] is - Y/N type or Text. Also is it correct understanding that you will be setting the favorite image with an inline action?

La columna es de tipo ENUM e incluye los valores SI y NO. 

la idea es que la imagen favorita sea la que se presente como portada del Envase.

 

MUCHAS GRACIAS

Assuming you are setting the favorite through an inline action, in the "only if this condition is true" setting of the inline action , please add an expression something like

NOT(IN("Yes", SELECT(Table_Name[Favorite], AND([Ref column]=[_THISROW].[Ref column], [Table Key]<>[_THISROW].[Table key]))))

Where [Ref column] is the column that references the parent table.

This should ensure that once a record is marked as favorite , other records do not have this action. available.

Top Labels in this Space