Show/hide button on workspace list page

ShuRiseUp2023
Tera Expert

Hi Community:

I have a requirement to show the Approve button on the Workspace list page above the list only when the selected records' state is a certain state, eg. awaiting approval. When user select some records that the state is not that one, the Approve button won't be available. In the Action Assignment, I set the Record Conditions as: state is awaiting approval. but the button won't show at all even the selected records' state is correct.

How to show/hide this button?

Thanks a lot

3 REPLIES 3

Diogo Ramos
Giga Sage

Hello, 

I've done something similar, but instead of hiding the button, the button is just disabled and you cannot click on it if you select a record that does not match the conditions. 
 
I have 1 declarative action of type List, where I have the following fields set  (some fields might not be available on the form, you need to add them).

Record Selection Required = True 
Group By = True (you don't need this)
Group = (my specific group where I have the edit button and the close button, you don't need this)
Enable Dynamic Evaluation = True  --> docs
Dynamic Record conditions = for example (state != awaiting approval)

Then when the user selects multiple records, if one fails the condition the button is not available

DiogoRamos_0-1741198741687.png


For the enable dynamic evaluation, note that as per documentation: 
You may experience slowness and unresponsiveness if this feature is used in combination with theSelect All, which selects all records in a list, as conditions must be evaluated for all the selected records.

What I do, is also setting a max number of records the user can select, on my situation I have the action implemented as a client script because I need to do some ajax operations, so I use the count variable from the action modal : 

DiogoRamos_1-1741199067568.png


I hope this helps 🙂

ShuRiseUp2023
Tera Expert

Thank you so much for your quick response. I don't know why in our instance; I can't enable dynamic evaluation. it's not checkable. 

ShuRiseUp2023_0-1741202758346.png

 

If you don't have the field Record Selection Required or Experience Restricted set to true, the field will be read only it comes from the UI policy (Enable Dynamic Evaluation field when Experience Restricted and Record Selection Required are true)

So make sure those 2 items are set on your declarative action.