Can I Create an action that sets the value of...

(Doron Assis) #1

Can I Create an action that sets the value of several columns ?

I’m currently working on an project plan tracking App, and about a week ago I started testing it’s protoype with a few of my foremen.

The app has plenty tasks, most of them repeat (for example, In the Tasks table I have 12 rows, each represent the same task, let’s say “Painting” in each of the 12 apartments in the building). the main interaction of each foreman within the app is reporting (by changing the status) of each task’s status at the end of the day.

The main complaint from my users concerns is the need to change each task status individually, although a considerable part of tasks can be done within a day or two.

all of the those tasks baring the same name, can I create an action that will change all of the columns with the same task name (let’s say “Painting”) to the same status ?

(Tony Fader) #2

@Doron_Assis You can use a grouped action to combine multiple actions into one. That will allow you to change multiple columns with a single action.

(Doron Assis) #3

Does it mean I’ll have to create an action for each task ? I have more then 20,000 tasks…

(Tony Fader) #4

@Doron_Assis No, you’d create an action for each column that you need changed. Then create a single “macro” action that calls all the sub actions.

If you need to apply an action to multiple rows, then you can either use bulk actions or reference actions.

appsheet.com - Bulk actions - One way to apply an action to multiple rows

https://www.appsheet.com/samples/This-app-shows-how-to-use-reference-actions?appGuidString=e76d2e73-3d26-475c-a8f8-9911f5015920 Bulk actions - One way to apply an action to multiple rows appsheet.com

(Doron Assis) #5

That’s where it becomes a bit tricky in my App. Each task in the App has 4 status possibilities. Once a user change a task’s status, I’d like for an action to pop up, and allow him to set the same status change to all the tasks baring the same name within the table.

(note there’s no list nor parent table for the tasks, it’s just one table with all the tasks inside it.)

I’m adding an image to demonstrate my will:

(Tony Fader) #6

@Doron_Assis Sounds like you should use a reference action. Ignoring for now the part about conditionally popping up…

Part of a reference action is the rows to apply it to. You’ll need to write an expression that selects all rows that have the same name:

SELECT(YourTable[KeyColumn], [Name] = [_THISROW].[Name])

Unfortunately, you’ll need to make a separate action for each possible value of your enum, since there’s no way to pass an argument to an action.

So if your enum has options {A,B,C} you’d need to make these actions:

  • Set status to A on a single row - Set status to B on a single row - Set status to C on a single row - Reference action: set status to A on all similar rows - Reference action: set status to B on all similar rows - Reference action: set status to C on all similar rows
(Doron Assis) #7

Tried it and it worked, Thanks !