Add the ID field to the table

Hi everyone,

I've been struggling for days trying to solve a problem, but I just can't find an effective solution.

I've developed an application in AppSheet with the following structure:

  • Cartelli: (ID, Equipment, Technical Site, Sign Name, Station, Route, Position, IP, Manufacturer, Model, Serial Number, Object Type, Team, Catalog Profile, Type, Installation Date, Classification Field, Notes)

    • Key: ID
    • Label: Equipment (Number type)
  • Manutenzioni (Maintenance): (ID, Sign ID, Maintenance Date, Maintenance Type, Operator, Outcome, Notes)

    • Key: ID
    • Label: Sign ID (Number type)
  • Verifiche (Inspections): (ID, Maintenance ID, Inspection Type, Outcome (YES/NO/NC), Notes)

    • Key: ID
    • Label: Maintenance ID (Number type)
  • Controlli Standard (Standard Checks): (ID, Inspection Type)

    • Key: ID
    • Label: Inspection Type

The goal is to create an app that allows generating one or more activities for each object in the Cartelli table. Each activity is recorded in the Manutenzioni table, specifying the related sign, the date of the intervention, the assigned operator, and any notes.

The inspections related to each activity are stored in the Verifiche table, which includes a reference to the activity (via the ID from the Manutenzioni table) and all the checks to be performed, copied from the Controlli Standard table each time a new activity is created.

The issue is that the "Maintenance ID" field in the Verifiche table remains empty.

Current steps:

  1. A Bot is triggered when a new row is added to the Manutenzioni table.
  2. The Bot executes a Task composed of a series of Actions, including:
    • Adding new rows to the Verifiche table by copying data from Controlli Standard.
    • The fields being filled are:
      • Maintenance ID: This is where the issue occurs
      • Inspection Type: [Inspection Type]
1 2 77
2 REPLIES 2

Hi @MPollicino 
I had a very similar problem and it was extremely difficult to pin down exactly what the issue was. It seems as though you have all the right fields in place, although you do not state if you have any Ref columns in your Maintenance table, it is assumed that you do.

My particular issue had a similar setup as yours and my child table was not updating, and it was the key field that was the problem.

You will probably find there are a couple of issues....
1. You could try re-ordering the actions, especially the part that adds a new Maintenance record and make it one of your first actions.

2. Check that the Related field (to your Maintenance Ref column) is also included in the child table update / addition.

3. You may be better having a dedicated ID column that generates a value each time a new record is created. Possible have the same in all your child tables as well. You would still have your Maintenance ID column but some of your scenarios may not have the Maintenance ID value available. Hence have a dedicated ID column that produces a value automatically.

4. Check that no other part of the Bot or actions are writing to the main table (or any other table) and the bot is not triggering again. This is a particularly nasty problem that may require additional "check" columns to run and populate a field before anything else is done. In my case I need TWO bots, one to say I am about to run a bot and the second bot that does all the work. That way, your second bot will only run in the strictest of conditions. The first bot is there so that "check" fields can be populated to stop the bots running multiple times. I think the pros call this a "race condition", caused by "cascading actions".

I think you need to spread your actions and bots out a bit and clearly define when and how they execute. It certainly worked for me. Now my child table will always populate without the fear of second, third or more instances of the same bot running to cause problems.

I hope some of this helps you get to solving your problem. I am sure someone will be able to pick and correct me if I am wrong in any areas.

Good luck

Steve
Platinum 5
Platinum 5

Please post screenshots of the configurations of the involved bot components.

Top Labels in this Space