Discussions

Expand all | Collapse all

Add a new record but stay on the same same form

  • 1.  Add a new record but stay on the same same form

    Top
    Contributor
    Posted 04-03-2018 17:55
    I have two tables.  A Quality Records and a Defect/NCR/ CAR.  When creating a new Quality record, it becomes a Defect/NCR/ CAR.  I want to be able to click the button, create the Defect/NCR/ CAR but stay on the Quality Record.  

    Here is the formula:

    URLRoot() & "db/" & [_DBID_TABLE_1] & "?a=API_GenAddRecordForm&_fid_345=" & URLEncode ([Record ID#])& "&z=" & Rurl()


  • 2.  RE: Add a new record but stay on the same same form

    Posted 04-03-2018 17:58
    no problem,
    Just remove that last part & "&z=" & Rurl()  and you will "stick the landing", just like in gymnastics.

    URLRoot() & "db/" & [_DBID_TABLE_1] & "?a=API_GenAddRecordForm&_fid_345=" & URLEncode ([Record ID#])


  • 3.  RE: Add a new record but stay on the same same form

    Top
    Contributor
    Posted 04-03-2018 19:11
    It is taking me to the Defect/NCR/CAR table form.  I need it to create a Defect/NCR/CAR in Quality Records.  

    I don't think I'm explaining it very good.   I want it to stay in the table the user is in (Quality Record Table), but to create a record in a separate table (Defect/NCR/CAR).  Currently, it opening the defect/ncr/ car record.


  • 4.  RE: Add a new record but stay on the same same form

    Posted 04-03-2018 22:08
    I'm confused.  Please explain which is the Parent and which is the child and where you are at when you click Add Child and what form you want to land on when you save the child.

    Are you actually trying to add a record of the same type that you are sitting on?


  • 5.  RE: Add a new record but stay on the same same form

    Top
    Contributor
    Posted 04-04-2018 12:02
    The Child Table is Quality Records
    The Parent Table is Defect/ NCR/ CAR.  
    There was a grid edit on Quality Records that once the grid was complete (Defect/ NCR/ CAR Table),then a new record for Defect/ NCR/ CAR was created. 

    I want to get away from using the grid edit.  It is too time consuming for my guys on the floor.  I created a simple form in Quality Record that when they click the button, it will create a new record in Defect/ NCR/ CAR table.  I would like one to create new Defect/ NCR/ CAR record and close.  Another to create Defect/ NCR/ CAR record and copy.  

    I currently have a copy record button.


  • 6.  RE: Add a new record but stay on the same same form

    Posted 04-04-2018 12:11
    Sarah,
    I'm sorry, but I still am not able to understand your issue.  If you want to book one-on-one time with me to solve this issue on a GoToMeeting screen share session, you may contact me via the information on my website QuickBaseCoach.com


  • 7.  RE: Add a new record but stay on the same same form

    Top
    Contributor
    Posted 04-04-2018 12:12
    Here is my copy record:
    URLRoot() & "db/" & Dbid() & "?a=GenCopyRecord&rid=" & [Record ID#]
    THis copies the child record. 


  • 8.  RE: Add a new record but stay on the same same form

    Posted 04-04-2018 07:33
    Try the "API_AddRecord" instead of "Api_GenAddRecordForm"

    URLRoot() & "db/" & [_DBID_TABLE_1] & "?a=API_AddRecord&_fid_345=" & URLEncode ([Record ID#])& "&z=" & Rurl()


    Remember when you use this call, you must add values for all required fields in this other table or API_AddRecord returns an error.

    I hope it helps.


  • 9.  RE: Add a new record but stay on the same same form

    Top
    Contributor
    Posted 04-04-2018 12:09
    I get this error:
    This XML file does not appear to have any style information associated with it. The document tree is shown below.

    <qdbapi>
    <action>API_AddRecord</action>
    <errcode>0</errcode>
    <errtext>No error</errtext>
    <rid>36550</rid>
    <update_id>1522843734635</update_id>




    </qdbapi>


  • 10.  RE: Add a new record but stay on the same same form

    Posted 04-04-2018 12:21
    I think there is not error , you already created the record in the other table.


  • 11.  RE: Add a new record but stay on the same same form

    Posted 04-04-2018 12:29
    This is suppose to be a "formula URL" field you select the option to display it in a button , every time you click the button you create a new record in the other table.

    you can take this out ;  & "&z=" & Rurl()

    (check that the field 345 is the related field. It looks like you have a lot of fields)


  • 12.  RE: Add a new record but stay on the same same form

    Top
    Contributor
    Posted 04-04-2018 12:37
    I created a new test record.  


  • 13.  RE: Add a new record but stay on the same same form

    Posted 04-04-2018 12:43
    I do not understand what you mind with "new test record"


    You created in the table ; [_DBID_TABLE_1] a record  (Id 36550) which field 345 is equal to the "URLEncode [Record ID#]  




    URLRoot() & "db/" & [_DBID_TABLE_1] & "?a=API_AddRecord&_fid_345=" & URLEncode ([Record ID#])