Duplicate record has stopped working
Hi, I created this code to duplicate a current record, remove information from specific fields and then open that new record. I have been using it successfully for the last 3 years but it has suddenly stopped working and only duplicates the current record exactly as it is. Can anyone help please?
let currRec := Id;
let xDup := duplicate(this);
xDup.('Length (ft)' := null);
xDup.(Width := null);
xDup.(Room := null);
closeRecord();
openRecord(record(Estimates,xDup.Id))
23 replies
-
is it like this post?
-
I have the same problem in the app with code:
let newRecord := duplicate(this);
openRecord(newRecord);
newRecord.(Factuurdatum := null);
newRecord.(Betaaldatum := null);
newRecord.(Factuurnummer := null)I then have to go back to the table, then refresh it to see that complete duplicated record. I cannot go to the cloud due to privacy sensitive laws with my database. Ninox public cloud has not enough security for this specific database security.
I do hope this issue of duplicating records will be resolved in the app ...
-
I am on cloud version and also do many duplicate Records via script as opposed to the inbuilt duplicate record button as I too reset some date ie change date to current date , set next job number etc..
Firstly I can say in last 4 years of using ninox in cloud features like this have been reliable and as you know Ninox jump on cloud fixes before apps etc.
As to is the cloud worth it. For me a definite yes as being multi user set up it has freed me from travelling to my office and enabled me to dump my local servers etc. The ticketed price of the subscription for me is fine as frankly all my business production is now on Ninox and the gains I have made from using Ninox more than offset the price. support have always responded with a few hours if needed to look at my issues and thankfully there seem to be fewer in last 12 months etc.
I do accept that this might not make sense to a 1 person on a Mac with x database primarily with hobby type datasets
the ability to manually do backups and download them is useful, especially before new data changing scripts are run.
I am tending to find that later versions seem to be less error prone (based on the features etc that I use or require)
-
I tend to open my duplicated record and then nullify the fields etc once opened.
thus I don't do a close record command!
might be worth a try and see it this works for you
ie here is one of my typical "Copy Button"@ scripts
let before := max((select JobDockets).'Job Bag');
let xJob := 'Job Bag';
let xDate := 'Order Date';
let newRecord := duplicate(this);
openRecord(newRecord);
newRecord.('Job Bag' := before + 1);
newRecord.(Status := "New Job");
newRecord.('Branch Selector' := null);
newRecord.('Delivery To' := null);
newRecord.('Delivery Address' := null);
newRecord.('Won?' := null);
newRecord.('Order Ref' := null);
newRecord.(DispatchBy := null);
newRecord.(Promised := null);
newRecord.('Quote Ref' := null);
newRecord.('Prev Ref' := xJob);
newRecord.('Prev Date' := xDate);
newRecord.(Proforma := null);
newRecord.('Inv Sent' := null);
newRecord.('Payment Method' := null);
newRecord.('Date Paid' := null);
newRecord.('A/w Req?' := null);
newRecord.('Visual Passed' := null);
newRecord.('Other Action' := null);
newRecord.('Sage Inv' := null);
newRecord.('Order Date' := today());
newRecord.(AckFlag := null);
newRecord.(DispFlag := null);
newRecord.('Dispatched Date' := null);
newRecord.('Carrier Service' := 1);
newRecord.('Internal Notes / lnvoice Comments' := null);
newRecord.(SupInv := "No");
delete newRecord.'Purchase Orders';
delete newRecord.'Delivery Notes' -
Hi,
Looks like the 3.12.2 update has fixed the issue
Content aside
- 7 mths agoLast active
- 23Replies
- 168Views
-
6
Following