Action button only available conditionally

Is it possible to have an action button appear conditionally? For example, I’d like the View and Add action buttons in the below detail view to not be available should the Production Stop Time column have a value. I put an equation on the System Add action Only if this condition is true of: ISBLANK([Transaction ID].[Production stop time]).

In the Runs for the day reference view, each of the rows are part of the Daily Production Report table with rows keyed with Transaction ID.

Doesn’t seem to make the action button go away though!

Thank you in advance!

Solved Solved
0 9 1,310
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Yes.

View is not, technically speaking, an action button. There is no way to hide View.

Add is displayed because the table or slice referenced by the items in the list allows adds. To hide the Add button, point your list to a table or slice that doesn’t allow adds. Your case is a little complex, though:

In that case, you’ll need two columns: one for the list that references a table or slice that allows adds, and one for a slice that does not allow adds. Then, use Show? expressions for each to show or hide when appropriate.

View solution in original post

9 REPLIES 9

Steve
Platinum 4
Platinum 4

Yes.

View is not, technically speaking, an action button. There is no way to hide View.

Add is displayed because the table or slice referenced by the items in the list allows adds. To hide the Add button, point your list to a table or slice that doesn’t allow adds. Your case is a little complex, though:

In that case, you’ll need two columns: one for the list that references a table or slice that allows adds, and one for a slice that does not allow adds. Then, use Show? expressions for each to show or hide when appropriate.

Thanks Steve for the assistance, I’ll run with this!

Can you share with me your sample please? I am running into a similar scenario.

Hi @timutana, based on Steve’s advice, I ended up getting this to work. In my case, we have some machines that make a product. The machine operators record their Runs on the machine for each day. I wanted it so that if the daily report was open they could add and edit the Runs. But once they “punched out” for the day and submitted the report they could only view the runs. No adds or deletes.

I ended up creating two virtual columns.

One was “Runs for the day” which had a Show if of “ISBLANK([Transaction ID].[Production stop time])” and pointed to an Open ticket runs slice of the Runs table. The slice allowed Adds and Updates.

The second was a “Runs for the day - production closed” virtual column which had a Show if of “ISNOTBLANK([Transaction ID].[Production stop time])” and pointed to a Closed ticket runs slice of the Runs table. The slice was Read only.

Both slices were the exact same info, no conditions on the slice other that the one allowing add/updates and the other being view only.

At the end of the day you have a few things going on. You have 2 virtual columns, each with a show if condition. And each virtual column reference a different slice of the same table. One slice being Read only.

Would this work for you? What’s your application?

Well done!

Thanks for all the help and suggestions you provide.
I found a solution with a suggestion you made on another post.
Take care mate.

Great!

I solved my problem using a solution which is similar to yours. I think it was Steves answer as well.
I created two virtual columns and then used a show condition to show and hide which table.
Thank you ver much for taking out the time to help me.
Have an awesome week mate.

I have same quiestion.

I have similar situation, but I want to check: The status value of main table is what? (Open, OnDemand, Suspend, Closed). If value = Closed, I want to deny add button to bottom table. Similar not function if I make text value to numbers, and I check this... (button every time look, or every time not)

More variations I try to button condition, but not function. Have ref_rows between tables, if I make vrtual column with formula, thats get the value. To button (add) is not.

Greetings: Thomas

Top Labels in this Space