Discussions

 View Only
  • 1.  Ingnore Reporting Error 400 on add new record

    Posted 03-05-2018 13:27

    I am using Quick Base Actions to add a new record to a child table when a new record is added to the parent. The parent table is  connected to a Drop Box CSV file and the field I am copying is the Key field in the Child Table. The copy is working fine, but when I rerun the Connected table Sync to update the parent table the Action is triggered. When the action try's to add a new record to the Child table it raises the 400 error "cant add duplicate record to Key field".

    My question is can the 400 error be ignored and not be reported as a failure. I am still in the testing faze but production will have over 10,000 records that is a lot on error messages



  • 2.  RE: Ingnore Reporting Error 400 on add new record

    Posted 03-05-2018 13:36
    I suggest that you put a condition on the Action so it does not try to duplicate a Key field.  I'm not quite sure I understand your setup in terms of duplicating the Key field, but it sounds like you have a 1 for 1 relationship where every parent has exactly 1 child record and you have set the Key field of the Child to be the same as the Record ID# of the Parent.

    If that is the case, then you should be able to do a summary field of the # of children, and not fire the Action of the Parent already has it's child record created. 


  • 3.  RE: Ingnore Reporting Error 400 on add new record

    Posted 03-05-2018 14:18

    Sounds like we are on the right track I tested the solution but still got the error.

     below is the criteria I added

    this is a one to one as you stated The parent is a read only Synced table with 28 fields and the Child has additional fields that needed to be added to the work order table and needed to be editable by the user



  • 4.  RE: Ingnore Reporting Error 400 on add new record

    Posted 03-05-2018 13:59
    I am not sure what your setup is or what the error a "400" refers to. Is it a HTTP Status code 400?

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400

    I don't see anything close to a "400" error code in the HTTP API:

    https://help.quickbase.com/api-guide/index.html#errorcodes.html

    If API_AddRecord is generating the error there is a parameter ignoreError you can add to the call:

    HTTP API API_AddRecord
    https://help.quickbase.com/api-guide/index.html#add_record.html

    A screenshot or more details would help understand what is going on.


  • 5.  RE: Ingnore Reporting Error 400 on add new record

    Posted 03-05-2018 14:05

    Here is the screen shot of the error



  • 6.  RE: Ingnore Reporting Error 400 on add new record

    Posted 03-05-2018 14:12
    Before you get into non native solution, I suggest my solution to avoid trying making duplicate Key fields.


  • 7.  RE: Ingnore Reporting Error 400 on add new record

    Posted 03-05-2018 14:20
    You could try and add  the parameter ignoreError  to the API_ImportFromCSV call and cross your fingers.  Sometimes there are undocumented parameters on the various API methods. Otherwise you can use script.


  • 8.  RE: Ingnore Reporting Error 400 on add new record

    Posted 03-05-2018 14:24
    Eric, your condition is backwards, right. You want to fire when the # of children is 0 not 1


  • 9.  RE: Ingnore Reporting Error 400 on add new record

    Posted 03-05-2018 15:50

    That worked

    Thanks for you help



  • 10.  RE: Ingnore Reporting Error 400 on add new record

    Posted 03-05-2018 15:57
    Great, thx for letting me know.
    It is actually pretty cool that that works as Quick Base is essentially mass updating and then for each record imported it needs to calculate that summary field to decide if it needs to fire the Action.