Figuring out Bots

Hy everyone,

I’m having a bit of a hard time figuring out Bots.
I have a Projects table and an Objects table. A Project has many Objects.
Both Projects and Objects have due dates.

I’d like to make a Bot that goes something like this:

  • When the DueDate of a Projects is updated
    • If the DueDate of it’s asociated Objects was equal to it, then update that DueDate too,
    • And for those Asociated Objects that did not have the same DueDate as the Projects, leave it as it is.

The point being that Objects have an Initial value for the DueDate to be equal to the Project. So if it’s not equal, it means someone changed it on porpouse so no need to change it if the Projects changes. But if it’s the same, than it should change at the same time as the Project.

This really sounds like something a Bot should be able to do but I can’t figure out how.

The event is easy but the Process, steps and tasks … actions … anybody could sketch these steps out for me and I’ll give it a better go?
Or if it’s not something that can be done than, at least I know now

Thank you,
Sorin

0 4 236
4 REPLIES 4

SkrOYC
Participant V

How much progress have you done with this?
At which point you were stuck?

Well … it’s tricky to say 'couse I went a few ways and got stuck in all of them.

So the event was easy to check if the DueDate of the Project has been changed:
[_THISROW_BEFORE].[ProjectDueDate] <> [_THISROW_AFTER].[ProjectDueDate]
with updates only selected.

Then … I don’t know how to build the bot.

  1. First I thought maybe I can return the BeforePrjectsDueDate value and keep it (also the AfterProjectsDueDate), and then do an action on a number of rows and update the new date for all Rows of Objects where the ObjectDueDate is less then or equal to the BeforeProjectsDueDate and change it to AfterProjectsDueDate.
    But when I try to do that it says - Unable to find column ‘_THISROW_BEFORE’ . so that doesn’t work.

  2. If I try to do all that in one go, with an action on a set of rows, with referenced table - Objects Table, Referenced action would be to change a value to AfterProjectsDueDate but I don’t know how to save this date and also, how to select just those rows with a formula at the Referenced Rows. PLayed around for a while there but … no real progress.

Hei any suggestions on something for me to try out in this scenario?
Thanks

I don’t think the Bot needs to be very complicated - 1 Event and 1 Process with 1 Step that activates a “Execute an action on a set of rows” action which then calls the target action. You have the Event figured out so I’ll skip that.

2)  Add a Process 
 
3)  Add a single step inside the Process.  The Step performs the "Run a Data Action".  
    If you don't see that option, it likely means the Process does not have a Table set.  
    From the Process, click the "Go To: Process" link in the lower left-hand corner.  
    Set the Process Table to the same as that of the Event.  Now you should see the 
    "Run a data action" option.

4)  If you have NOT yet created the "Execute an action on a set of rows" action, 
    click the Action dropdown and choose "Create new action" 
     4a)  Choose "Execute an action on a set of rows".
     4b)  Implement the expression in the Reference Rows property to identify the list of Object rows to be updated.
     4c)  Create the target action on the Objects table.

            4ci)  Set this action to update the Due Date column = [Project].[Due Date]

     4d)  Add the target action to the Reference Action setting.

I hope this helps! I know you’re very familiar with AppSheet so just gave the text version but if you need more details or something doesn’t make sense, just say.


EDITED: FYI, I think I would do this WITHOUT a bot. Simply attach the actions specified above to the Form Saved behavior. Then no bot is required and the updates happen almost instantaneously for that user.

Top Labels in this Space