Hide add action on the parent table

Hi,
I got two tables parent and child:

My goal is to hide add action on parent table after the user press add(just today but show up next day) ,but the add action on child table is unhide.

Please advise.

Thanks

0 12 401
12 REPLIES 12

Aurelien
Google Developer Expert
Google Developer Expert

Thank you for your reply, but my question was how to hide add action after the user press add for today(one time) but show up next day.

3X_3_b_3ba2ab648efea457a0873b8297e3549554067f03.png

please advise if you have any idea

Thank you for your reply my request is the expression to make the add action on parent table hide when the user press add for today and it shows up next day.

Please advise

Hi @Mouldi_Zeghouani

Something is unclear to me.
If you talk about parent and children table, then this is not the action button you show in your capture.
This one is a “normal” add button.

Anyway, you may want to have a look there:

Assuming the children table you talk about have a [TimeStamp] column, then you may want to get this one, then check if it’s today or not.

When I say “you may want to get this one”, relatively to the post above, that would be:
“get the last TimeStamp value from the table, entered by the currrent user” or something similar.

Please see also:

The only way to accomplish what you want:

  1. Create a read-only slice of the child table. All other settings of the slice should be left at their defaults.

  2. Add a new virtual column to the parent table with an App formula expression of [Related childs], replacing Related childs with the name of the existing Related … column that refers to the child table.

  3. Set the Show? expression for this new virtual column to something like:

    ISNOTBLANK(
      SELECT(
        [Related childs][_ROWNUMBER],
        (TODAY() = [date])
      )
    )
    

    Replace Related childs and date with the appropriate column names.

  4. Set the Show? expression for the existing Related childs virtual column to something like:

    ISBLANK(
      SELECT(
        [Related childs][_ROWNUMBER],
        (TODAY() = [date])
      )
    )
    

    Replace Related childs and date with the appropriate column names. Note that is expression uses ISBLANK() where the one in (3) uses ISNOTBLANK()

The idea here is to create two identical lists, one of which allows Add and one that doesn’t, display only the one that allows Add only when appropriate, and display only the one that doesn’t otherwise.

Thanks @Steve for explaining step by step the “how to”

Please excuse my question.
Is this method no longer possible?
I get a duplicate columns named error because the name of the new VC and the existing columns are duplicates.

Thank you for your replay .

The idea is the use add just one list a day for that I want hide the add action when the user press it today.
3X_3_b_3ba2ab648efea457a0873b8297e3549554067f03.png
But the add on list keep it unhide.
3X_f_5_f54eb8962532fec9ff6eee0399d115c6374989d6.png

Thanks

Hi @Mouldi_Zeghouani

Ok, so you are really talking about an inline Add button then

You have to keep in mind that you can’t just make a show_if condition on an action button of a children table and expect it to disappear in the inline, as it is not a row-level action button.
The best way to get rid of it is with the mechanism illustrated in the sample app.

You will need to change the condition on the Show_If of the “related children” columns, to show or hide the “Add” button, because these inline actions are attached to the list of references displayed.
So:

  • the first list will reference a slice which is an exact copy of your children table, but with update mode “read-only”.
  • the other one refers to your usual children table (this is the one naturally generated by AppSheet)

This is tricky and counter-intuitive, but I had this exact need a few months ago and the Support Team helped me into dealing with that.

I hope this helps, let us know if not.

I don’t think he is actually asking about how to hide the inline child add button. I think he is just asking his question very poorly.

ISBLANK( FILTER(
  parent-table ,
  [date] = TODAY()
) )

Thank you Aurelien and Steve for yours helpful explanation

Top Labels in this Space