Action to add new record(s) based on reference?

I'm building a water meter reading database.

I have the table: NombreMedidores with Columns for Name, MedidorID, etc...

When a meter is read, the information is placed in the table "Lecturas".  The user selects the meter by a drop down list of MeterID that is referenced from the "NombreMedidores" table, then enters the reading.

I'm trying to create an action to capture the meters that we don't have access to read.  

We do our readings on the second to last day of each month, but invariably, there are meters that we don't have access to on that day.  So, I have to capture those in the same "Lecturas" table also.  I have the following tables setup:

Screenshot 2024-06-22 111206.jpg

Screenshot 2024-06-22 111238.png

The action I have is:

Screenshot 2024-06-22 111810.png

The expression for the Medidor is:

IF(
   ISBLANK(
      SELECT(Lecturas[Medidor], [Medidor] = [_THISROW].[Medidor])
   ),
[Medidor],
[_THISROW].[Medidor]
)

I also get the errors that I can't update the fields: Medidor and Fecha.  Is this because Medidor is a reference, and Fecha is calculated for each new entry?

Solved Solved
0 1 88
1 ACCEPTED SOLUTION

The action "Add Blank Meters"  has no rows in context so the [_THISROW] qualifier points to nothing and there is no date column [Fecha] to reference and set the value in the new row column [Fecha]. 

Instead you want to use an action of type "Data: add a new row to another table using values from this row".

Screenshot 2024-06-22 at 12.55.42 PM.png

View solution in original post

1 REPLY 1

The action "Add Blank Meters"  has no rows in context so the [_THISROW] qualifier points to nothing and there is no date column [Fecha] to reference and set the value in the new row column [Fecha]. 

Instead you want to use an action of type "Data: add a new row to another table using values from this row".

Screenshot 2024-06-22 at 12.55.42 PM.png

Top Labels in this Space