Can I hide the add action on an in inline table in certain views?

I have been hiding the add actions from table views based on conditions such as which view is on screen or user permissions, however i'm struggling to work out how to do the same for inline tables?

I can't see any system actions for inline tables and have looked all around but can't work it out. I want to conditionally hide the add button thats on this inline table below. 

clintinthecode_0-1660095879404.png

 

0 10 1,004
  • UX
10 REPLIES 10

Have you tried to use CONTEXT () function? I think I've already done it with this

Thats what im using in the actions on the table views, but I can't find any actions for inline tables

I saw a video from @MultiTech before where you totally hide that auto generated Add button for that table, and create your onw Add action button as a prominent button on the parent detail view.  
Here you can use CONTEXT() to hide or show them depending on the detail view you have the inline table visible.

My issue is that I can't see any auto generated add buttons for the inline tables. What I have is working perfect as expected for normal tables, but my issue is only with inline tables

There aren't any actions for inline tables because an inline table is just a normal table.

Go to the Behaviours tab and scroll until you see the table your Inline view is based on...there you will see all the behaviours.  If you cannot see any then it's because you must have hidded 'System Actions'.  There will be a button at the bottom to hide or show these.


@clintinthecode wrote:

My issue is that I can't see any auto generated add buttons for the inline tables


There will not be any separate add buttons for the inline views. There is only one system auto generated "Add" action button for a table.

You can use the approach of CONTEXT() functions suggested by @diogolupcosta to hide the "Add" button ( or strictly speaking link in inline views) in inline views.

 

OK, I can see what it is you want to do.

First thing is you need to hide the Add button completely for your child table (the inline table you are showing here).  Find it in the Behaviours section, it will be a system action called Add and you will set its Behaviour to FALSE

scott192_0-1660122056575.png

The next thing to do is to go to your master table Behaviour section and create a new behaviour.

This will be set to be APP:Go to another view within this App.

scott192_1-1660122195364.png

Replace 1 with the name of the view you get when you add a new row to your inline table.

Replace 2 with the name of the Field on your Inline table that links it back to your master table.

Replace 3 with the Key field of your master table.  Make sure you have the quotes and brackets in the right place!

What this action does is to open a new form that is prefilled with the key that links it back to your master record.

Set this action display Display Prominently and in the behaviour section, set your formula to show/hide this button against your specific criteria.

You now have a button that will display at the top of your detail view if the current user is allowed to see it.  If the user clicks that button it will open the form that allows them to add a new row to the child table.

 

 

Steve
Platinum 5
Platinum 5

In Behavior >> Actions, in the system-generated Add action for the table, in the Only if this condition is true property, use an expression like this:

("detail-view-name" <> CONTEXT("View"))

 Replace detail-view-name with the name of the detail view in which you want the Add button hidden.

Will that work if the view is part of a Dashboard? @Steve 

In a dashboard, CONTEXT("View") always returns the dashboard view name, so instead of naming the detail view, name the dashboard view in the expression.

Top Labels in this Space