show if button based on value of another table

I have 2 tables:
PROGETTI - with key column ID PROGETTO
RATEI DA PROGETTI - with key column ID RATEO and so the REF column ID PROGETTO

I would hide an action in PROGETTI table when the column STATO in RATEI DA PROGETTO table is "INCASSATO".

Consider also that I could have more than one ID RATEO for one ID PROGETTO record, so the condition must work for almost one of them

Solved Solved
0 1 150
1 ACCEPTED SOLUTION


@Espegg wrote:

so the condition must work for almost one of them


"almost one of them" doesn't make sense in English. I don't think that translated well. In which of the following situations do you want the action button to be hidden?

 

When ALL child records are "INCASSATO"?

ISNOTBLANK( SELECT( [related...][key] , [stato]<>"INCASSATO" ) )

I.e. "display the action if there is at least one related record that is not "INCASSATO"

 

 

Or when AT LEAST ONE child is "INCASSATO"

ISBLANK( SELECT( [related...][key] , [stato]="INCASSATO" ) )

I.e. "display the action when there are no "INCASSATO" related records.

 

Always remember that show_if conditions must be written for the case of when to show the thing, not when to hide it.

View solution in original post

1 REPLY 1


@Espegg wrote:

so the condition must work for almost one of them


"almost one of them" doesn't make sense in English. I don't think that translated well. In which of the following situations do you want the action button to be hidden?

 

When ALL child records are "INCASSATO"?

ISNOTBLANK( SELECT( [related...][key] , [stato]<>"INCASSATO" ) )

I.e. "display the action if there is at least one related record that is not "INCASSATO"

 

 

Or when AT LEAST ONE child is "INCASSATO"

ISBLANK( SELECT( [related...][key] , [stato]="INCASSATO" ) )

I.e. "display the action when there are no "INCASSATO" related records.

 

Always remember that show_if conditions must be written for the case of when to show the thing, not when to hide it.

Top Labels in this Space