Duplicate and Link New Data Entry from One Table to Another
I know this might be a dumb question but I am really new to Ninox so I help someone would be patient enough to read this.
I have 2 tables, Product Masterfile and New Products.
Whenever I input a new product data on "New Products" I want to create a new entry on "Product Masterfile" that contains some of the data that I input on the new row/product from "New Products" (ie. Barcode Number, Size, Price). Further, I want to link both rows such that if I change a column entry on "Product Masterfile" it would also reflect on "New Products" and vice versa.
Is this doable on Ninox? How would I code this?
Also, does this apply to dropdown menus and multiple choices? (ie. Yes/No choices)?
Thank you so much to anyone who can help!
1 reply
-
Yes very doable
in simple terms you can use a scrip to copy x number of fields over to the other table record
I would suggest you look at some of the tutorial videos on this forum and espescially at Andy's videosfrom Nioxus on youtube
However as a guide only! - the following code I trigger from a button (but it could be triggered form the form itself etc.)
let xCurrRec := Id;
let xNewSupplier := Supplier2;
let xNewPCost := 'Print Cost';
let xNewSCost := 'Screen Cost';
let xNewDCost := 'Del Cost';
let i := (create JobBagCosts);
i.(Supplier := xNewSupplier);
i.(PrintCost := xNewPCost);
i.(ScreenCost := xNewSCost);
i.(DeliveryCost := xNewDCost);
i.(JobDockets := xCurrRec);What this does is
Gets the record id ....let xCurrRec := Id;
Creates some variables ie XNewSupplier an stores the current supplier field data into that that variable...etc let xNewSupplier := Supplier2;
creates a new record in JobBagCosts with ..... let i := (create JobBagCosts);
writes a field entry into the record i.(Supplier := xNewSupplier);
Content aside
- 3 yrs agoLast active
- 1Replies
- 213Views