Forum Discussion

RickyWhite's avatar
Qrew Member
4 months ago

URL Add Record then Save

I need an URL to allow me to Add a record, then save it, and then allow me to edit it. When hitting the add record button it creates a form filled out but the users need to add a document then hit a checkbox on a report link. When the users hit save the checkbox from the report link did not go through. They then have to edit the record and hit the checkbox again. This checkbox is in a report link that is to another table. I need it to where they don't have to keep going back to reselect the checkbox.

This is the current formula:

URLRoot() & "db/" & [_DBID_TABLE_1] & "?a=API_GenAddRecordForm&_fid_8=" & URLEncode ([Field 1]) & "&_fid_22=" & URLEncode("Document") & "&z="

Ricky White

14 Replies

  • So to clarify - you want them to add a record - then save - then do you intend for them to land in a way that they can check the box or have the box checked also upon save? If the checkbox is in another table - how are you identifying the record that needs to have the box checked? 

    Chayce Duncan
    • MikeTamoush's avatar
      Qrew Commander

      Are you using an editable report link? Meaning when you try to use the editable report link in add mode, it doesn't add the child correctly (selecting a checkbox would in essence be adding a child). There are instructions in Kirk Trachys magic buttons to add a child record, save it, then land on the child record in edit mode. Is that what you need?

      Mike Tamoush
      • MarkShnier__You's avatar
        Icon for Qrew Legend rankQrew Legend

        If you want to essentially save and keep working, so that the record is saved and you land the user in the record in edit mode, then  you can provide a Formula Rich Text Button with this code below.  You would need to provide instructions to the users to use this special button and not the regular save button.  This should have the same effect as the user manually selecting the "split" drop down option on the regular Green save button to Save and Keep Working.  That option is a bit obscure so not really discoverable for regular users.

        This button will work in both Add Mode or Edit Mode.

        var text RID = If([Record ID#]>0, ToText([Record ID#]), "%%rid%%");

        var text URL = URLRoot() & "db/" & Dbid() & "?a=er"
        & "&rid="& $RID;

        "<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #117a39; border-radius: 5px; color: #FFFFFF; display: inline-block; padding: 4px 4px 4px 4px; width:140px; text-align: center; text-shadow: none; border: 2px solid #0863f5; font-size: 12px \"href='"
        & $URL
        & "'>Save and Continue</a>"

        Mark Shnier (Your Quickbase Coach)