Action Behavior Only if this condition is true not working

I'm tryng to show the action button ADD only when the Status column is equal to "1-Ativo".

SteelbrasDev_0-1720553962087.png

When I click on the test button, it even shows Yes or No on the correct rows, but when I access the application, the button simply does not appear in any case.

SteelbrasDev_1-1720554014942.png

SteelbrasDev_2-1720554034600.png

 

 


All tables are enabled to add, update and delete. And the slices have the actions.

Can someone help me?

Solved Solved
0 10 983
1 ACCEPTED SOLUTION

Ahh ok. This is a common ask. The solution is to create a slice on that child table that is read-only. You then create a new VC on the parent table that is a copy of the existing "Related..." REF_ROWS VC, except that the new one should point to the slice instead of the base table. Make sure to change it in both the column config as well as the REF_ROWS expression. You then set opposing show_if conditions for the 2 VCs so that the original shows when [status]<>"1 Ativo", and the new one shows when [status]="1 ativo".

View solution in original post

10 REPLIES 10

What type of view(s) are you trying to show the action button on?  

I'm trying to show in the view generated by the system "Clientes_details", my table is called "Clientes".

The add action is not a "row-level" action. That means it does not run in the context of a single record, but is instead context-less. So it has no idea which record you're wanting to compare the status value from. You'll need to provide more details if you need a suggestion on how to proceed.

SteelbrasDev_0-1720640948381.png

I see, makes sense now that it didn't work.

I have this table called "Clientes". In this table there is a field called "Status" and a ref field to another table that show all the related "Pesquisa de Satisfaรงรฃo". So I need the action button to appear only when the Status is equal to "1-Ativo".

 

Ahh ok. This is a common ask. The solution is to create a slice on that child table that is read-only. You then create a new VC on the parent table that is a copy of the existing "Related..." REF_ROWS VC, except that the new one should point to the slice instead of the base table. Make sure to change it in both the column config as well as the REF_ROWS expression. You then set opposing show_if conditions for the 2 VCs so that the original shows when [status]<>"1 Ativo", and the new one shows when [status]="1 ativo".

Hello
I am nearing the solution here 
I am stuk on this part

Set Conditional Visibility:

  • For the original VC:
    • Set the show_if condition to [status]<>"1 Ativo". This will hide the original VC when the status is "1 Ativo".
  • For the new VC:
    • Set the show_if condition to [status]="1 ativo". This will show the new VC (referencing the read-only slice) only when the status is "1 Ativo".

Where are those part I can find where to set that conditionality..

to be more complete the subform or sublist are generated by the systems and there is no way to formulate the conditionality

Could you show an example of this solution? 

Top Labels in this Space