Issue with Retrieving Values in an AppSheet Action

Hi everyone,

I’m encountering a problem in my AppSheet app and need help finding a solution.

Here’s the context:

  • I have a table Jobs.
  • When a new entry is added to the Jobs table, a BOT (On Add Job) triggers and adds an entry in the JobWorkItems table, filling the columns Id, JobId, and WorkItemCode.
  • Then, a second BOT (On Add JobWorkItem) triggers. It runs a Run action on rows on the WorkItemTemplateTasks table with the following Referenced Rows:
     
    SELECT( WorkItemTemplateTasks[Id], [WorkItemCode] = [_THISROW].[WorkItemCode] )
    and uses the AddOnTask action.

My Problem:

The AddOnTask action adds a new row to the Tasks table and fills several columns:

  • Id: auto-generated.
  • Type and IsPlanifiable: retrieved from the WorkItemTemplateTasks table.
  • But for the JobId and WorkItemId columns, I’m unable to figure out how to retrieve the values from the JobWorkItems table.

I’m unsure of the best way to pass this information to the action so it can properly save these values in the Tasks table.

Does anyone have an idea how I can achieve this?

Thanks in advance for your help!

Capture d’écran 2024-12-29 à 14.20.23.png

 

Capture d’écran 2024-12-29 à 14.20.42.png

 

Capture d’écran 2024-12-29 à 14.22.02.png

 

Solved Solved
0 2 114
1 ACCEPTED SOLUTION

Steve
Platinum 5
Platinum 5

There should be no "second BOT (On Add JobWorkItem)". Instead, the first bot should add the JobWorkItem rows itself.

View solution in original post

2 REPLIES 2

If you want to add data to foreign tables, you should create this data action on table for itself first. Then you can "share" the action to make it public for other tasks. Then you can call this this action remotely from other tables. So it may look then like this (from my project):call process.png

It's not a solution but may inspire you to explore other directions to solve your problem.
You can also create entire bots as process container, disable them and use them only as slaves to be called remotely.

 

Steve
Platinum 5
Platinum 5

There should be no "second BOT (On Add JobWorkItem)". Instead, the first bot should add the JobWorkItem rows itself.

Top Labels in this Space