Condition for Behavior

Hello guys,

I need your help

I want the "add" action to appear when [related hazards]>=1.
I used this formula COUNT(schedule[Related hazard])>=1, but it didn't work. is the formula I'm using wrong?

Thank you for your help.

Untitled.png

alhazen_1-1659087275145.pngalhazen_2-1659087307638.png

 

0 4 87
4 REPLIES 4

Try

 COUNT([Related hazards]) >= 1

[Related Hazard] is a ref type column in the Schedule table, meanwhile i set the "add" action for hazard table. It's definitely not working.

I tried use this formula Count(select(Schedule[related hazards], [id]=[_THISROW].[schedule]))>=1, but still not working

Add is not a row-level action and, so, can't reference values from a current row, such as a parent id.

I don't have experience with your specific scenario, but maybe the following would work for the context you mention?

COUNT(hazard[id]) >= 1

Maybe you could meet your need in another way? For example, don't even show the [Related hazards] column in the form if it's empty?

ISNOTBLANK([_THIS])

 

Steve
Platinum 4
Platinum 4

There is no trivial way to accomplish what you want. To get it, you'll need to add a slice of the table that doesn't allow adds. You could either use that slice to display the hazards and add an action button to allow adds, or add a virtual column that uses the slice and use Show_If to display the hazards list that's appropriate to allow adds.

Top Labels in this Space