Trigger on create with numeric fields
I am creating a table from another table with trigger on create with this code.
let a := Factura.Cliente.Cliente;
let b := Empresa;
let c := Monto
let d := Fecha
let p := (create Flujo);
p.('Cliente / Proveedor' := a);
p.(Empresa := b);
p.(Concepto := "Ingresos");
p.('Monto Prov' := c);
p.(Fecha := d)
It works for all text fields but not for numeric fields like date and amount.
Please help.
10 replies
-
Just to verify that Monto and 'Monto Prov' are actual number fields and Fecha in both tables are date fields.
-
There are a couple of missing semi-colons in your code
let c := Monto
let d := Fecharegards John
-
Can you post a sample DB?
-
This is my original table
It has the following trigger
I get the following result
What am I doing wrong?
-
Sure.
Thank you very much for your help.
-
Hi,
I think the issue arises because you have put your code inside the 'Trigger on new record'.
Ninox runs your code instantly when you create a new record on the Table Facturado before you have the time to enter any values on the new record fields.
-
I suggest to put your code inside the 'Triger after update'.
Content aside
- 3 hrs agoLast active
- 10Replies
- 17Views
-
4
Following