Update Field in another table after update
Hi,
I am trying to update a 2nd table with a new record and add the SKU field from the first table.
Table 1 (Products) has a table reference to Table 2 (Stock Take Tracker). The new record gets created but the SKU does not popultae into Stock Take Tracker. The following code in on an after update field called 'stock level' on the Product table.
let myNewRecord := (create 'Stock Take Tracker');
let myA := text(SKU);
let myB := text('Stock Take Tracker'.'Stock Take SKU');
myNewRecord.myB := myA;
Reference from Stock Take Checker to Products in N:1.
Stock Take SKU is set on the Stock Take Checker table to show as:SKU.
Any ideas what is wrong?
Thanks
Matt
6 replies
-
let myA := text(SKU);
let myNewRecord := (create 'Stock Take Tracker');
myNewRecord.('Stock Take SKU':= myA)Steven
-
Hi, Thank you. I get the error:
Expression must return a number or record ID:myA at line 3 colomn 36.
Any ideas?
Thanks Matt
-
Maybe change first line into:
let myA := SKU;
the source field and the destination field must be of the same type. Both number fields or textfields.
-
Hi,
The following does not error....but does not work!
let myA := text(SKU);
let myNewRecord := (create 'Stock Take Tracker');
myNewRecord.'Stock Take SKU'.SKU := myAAlso when you go back into it is says:
let myA := text(SKU);
let myNewRecord := (create 'Stock Take Tracker');
myNewRecord.'Stock Take SKU'.(SKU := myA)Not sure why?
Thanks
Matt
-
Hi,
THis did not work either:
let myA := text(SKU);
let myNewRecord := (create 'Stock Take Tracker');
let myNewField := text(myNewRecord.'Stock Take SKU');
myNewField := myACan anyone help? No error, it just not update the field.
Thanks
Matt
-
Matt,
This works in attached example:
Download example here:
https://www.dropbox.com/s/lyomspfevzyf5bp/MrLuck.ninox?dl=0
Steven
Content aside
- 4 yrs agoLast active
- 6Replies
- 1069Views