Forum Discussion

WilliamWallace's avatar
Qrew Member
3 years ago

Is it possible to create a button to take you to the first (Edit) record of a specific table from the reports page?

Hi All,
Is it possible to create a button on a form page to take you to the first (Edit) record of a specific table on a form? Then create a Save button that takes you to the next (Edit) record in the table? 

Scenario: I have multiple tables, each populated from a master table that contains audit locations that have to be done in sequence. (DISCLAIMER: Audit needs to be done on mobile mode (iPhone 12 - 100's of users))


User clicks first button, it opens the first record in the table in edit mode, then the user picks the status dropdown and leaves a note (if applicable), then clicks another button to save and go to the next record in the series, etc, etc, etc, till last record is saved. 

I hope I'm making sense.

Thanks for any guidance.

William Wallace

1 Reply

  • If I understood the scenario correctly, the series of records that need to be edited are all on different tables, and are all children of one master table? Or is the series of records all on the same table?

    I have done something similar to this in order to open a record and have it redirect to another specified record after saving.
    I'm not sure it will work for multiple URLs, but it's worth a shot.

    The button would first redirect to the first record you want to edit.
    var text URLONE = URLRoot() & "db/" & tableid & "?a=er&rid=" & recordid;

    I don't know how you plan to retrieve the record id. Is it the maximum record of child records related to a parent table,
    or is it the first record ever created on the table?
    If that's the case, you might be able to use a formula query to retrieve all record ids of a table and capture the 1st, 2nd, 3rd, etc. on the list and use them in your URLs.
    I did something similar to retrieve the maximum record id of a table.

    Then you can write a second variable for the record to redirect to after saving the first one:
    var text URLTWO = URLRoot() & "db/" & tableid2 & "?a=er&rid=" & recordid2;

    The final product in a formula-url field: $URLONE & "&NextURL=" & URLEncode($URLTWO)

    For multiple URLs it would look something like this:
    $URLONE & "&NextURL=" & URLEncode($URLTWO) & URLEncode("&NextURL=" & URLEncode($URLTHREE)) & URLEncode(URLEncode("&NextURL=" & URLEncode($URLFOUR)))...

    Ahuva Brown