0

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

null
    • Fred
    • 8 mths ago
    • Reported - view

    is it like this post?

      • JamesLIv.1
      • 8 mths ago
      • Reported - view

       yes that seems to be the same issue. As I mentioned that line of code has worked perfectly for me for 3 years, but has suddenly stopped

      • Nick
      • 8 mths ago
      • Reported - view

       

      I had the same problem. I gone back to version 3.10.11 which is work fine.

      • JamesLIv.1
      • 8 mths ago
      • Reported - view

       ok thank you. Hopefully they will fix it soon. I’ve tried altering the code but couldn’t get any different result

      • Fred
      • 8 mths ago
      • Reported - view

      The big problem is Ninox will never tell us what they fixed, so you will have to keep trying it in each version and pray and pray.

      • Nick
      • 8 mths ago
      • Reported - view

      For better or worse since this year I've been doing my work with the app for Mac. 
      So I keep two versions in the apps folder. The version 3.10.11 which I have named Ninox (Orignal) and which I am working with.
      I also have the current version which gets all the upgrades and I test it now and then.

      • JamesLIv.1
      • 8 mths ago
      • Reported - view

      do you know if this problem also occurs on the cloud version rather than the app?

      • Nick
      • 8 mths ago
      • Reported - view

       I don't know since I don't have the cloud version ☹️

      • Fred
      • 8 mths ago
      • Reported - view

      In my post, I tested it an it only happens with DBs that are in local/iCloud storage. The public cloud version is NOT affected in browser or app.

      • JamesLIv.1
      • 8 mths ago
      • Reported - view

       ok thank you for this. I’ve been considering moving to the public cloud version instead of the Mac app which I currently am using. Do you find generally that it experiences less glitches out of curiosity?

      • Fred
      • 8 mths ago
      • Reported - view

      I originally bought the app. I made the move to the cloud when the app started to take a long time to be upgraded and fall behind in features. While the cost is quite a bit more, vs free, at least now I can use it on any device (windows and macOS).

      Plus, Ninox now gets a few more ducets, so hopefully it will make sure they stick around a bit longer and keep the product getting better.

      You also have to remember to download your data regularly so you have it case Ninox were to disappear.

      The negative is if a release breaks something bad then you have no way of going back. I am also disappointed that they have branched off a version of their product to the Private cloud with no announced timeline to bring the feature to Public cloud. I would love the do as database feature.

      Overall I've been happy with the move.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 8 mths ago
      • Reported - view

       

      You also have to remember to download your data regularly so you have it case Ninox were to disappear.
      

      Is a Joke ? 😥 😂

      • Fred
      • 8 mths ago
      • Reported - view

       You should always plan for a provider disappearing. I’m not saying Ninox will but you never know. 

      Always have a copy of your data under your control. 

      • JamesLIv.1
      • 8 mths ago
      • Reported - view

       the freedom to use it across multiple devices would be a key feature for me, but I was weighing up if it was worth the extra cost involved. But if it is indeed updated more frequently then that may sway my decision to go for it. 
      Thank you for your feedback on it :)

    • mpm
    • 7 mths ago
    • Reported - view

    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 ...

      • Nick
      • 7 mths ago
      • Reported - view

       What version are you using?

      For me, Mac version 3.12.0 has fixed the problem.

      • JamesLIv.1
      • 7 mths ago
      • Reported - view

      Hi Nick, I am using Mac OS Sonoma Version 14.4.1 and as of yet it still isn't working

      • mpm
      • 7 mths ago
      • Reported - view

       I'm running Ninox on the same system as James: Mac OS Sonoma 14.4.1

      For Ninox I have just updated to 3.12.2. I believe that up to 3.12 I had no issues what so ever with duplication.

    • Mel_Charles
    • 7 mths ago
    • Reported - view

    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)

    • Mel_Charles
    • 7 mths ago
    • Reported - view

    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'

      • Fred
      • 7 mths ago
      • Reported - view

      Just wondering why you choose duplicate() over create()? If you did create() then you wouldn't have to null out fields you can just set the fields you need.

      • Mel_Charles
      • 7 mths ago
      • Reported - view

       Because the actual record it self that I duplicate has loads of extra fields and several child records that will have data that I want to copy that data as well - thus for this task it would be a bigger job and my script above is the lesser of two evils (for me) 🤣

    • mpm
    • 7 mths ago
    • Reported - view

    Hi,

    Looks like the 3.12.2 update has fixed the issue 😎

Content aside

  • 7 mths agoLast active
  • 23Replies
  • 168Views
  • 6 Following