Clear column action button

Hello! I’m quite new to building w Appsheet and I am building a simple restaurant inventory app.

I’d like to have the user be able to use a self-initiated button action to clear the current values in the number column (minus the header) for old inventory quantities on hand in order to be able to start a new inventory count.

ideally I’d like the button placed above (meta to) the card list rather than in each card record as this action pertains to all records not one in particular and it seems more appropriate. but if the button for the action has to be shown in all card records then that’s fine I suppose.

hope I was clear on the issue and if anyone can help on the expression to create this action or workflow that would be awesome!

Thank you
Ethan

0 10 1,287
10 REPLIES 10

@Ethan_U
You can create an Action for that purpose for the associated table. The route is:

Behaviour > Add New Action

Not sure about this part. Do you want to display the action on all records or on particular records?

Steve
Platinum 4
Platinum 4

Action 1

  • For a record of this table: (inventory table)
  • Do this: Data: set the values of some columns in this row
  • Set these columns:
    • Prep: NUMBER("")
  • Only if this condition is true: ISNOTBLANK([Prep])

Action 2

  • For a record of this table: (see below)
  • Do this: Data: execute an action on a set of rows
  • Referenced Table: (inventory table)
  • Referenced Rows: FILTER("inventory-table", TRUE) (replacing inventory-table with the name of the inventory table)
  • Referenced Action: (action 1)

Action 2 is the button the user would press to perform the clear-all. Action 2 then invokes action 1 on each row of the inventory table to clear that row’s Prep value.

It would not be possible to place this action button in an aggregate view, so you’d either have to place it in each row, or in some other view. Note that this action can be initiated from anywhere–it doesn’t have to be initiated from the inventory table itself.

AWESOME I’ll give that a shot thank you so much!!!


@Steve wrote:

Action 1

  • For a record of this table: (inventory table)
  • Do this: Data: set the values of some columns in this row
  • Set these columns:
    • Prep: NUMBER("")
  • Only if this condition is true: ISNOTBLANK([Prep])

Action 2

  • For a record of this table: (see below)
  • Do this: Data: execute an action on a set of rows
  • Referenced Table: (inventory table)
  • Referenced Rows: FILTER("inventory-table", TRUE) (replacing inventory-table with the name of the inventory table)
  • Referenced Action: (action 1)

Thank you so much:-)

Today I found an answer from here instead of asking AppSheet Support. They are really kind to help me for solutions.

@Ethan_U
There are 2 ways to do that:
1- You can multi select rows in the table view and choose to apply any particular action
2- You can create an action that will clear the values in a particular column on a set of rows defined
The method to be used, totally relies on your process flow.

@Steve
Great minds think alike sir!

Indeed, my friend! Indeed they do.

@Steve
Besides, great friendships starts with great war

Wow I sense some fascinating history here LOL

I’d love to see the prequel some day

Thank you again gentleman

You’re welcome @Ethan_U, it’s totally our pleasure to be helped of.

Top Labels in this Space