Forum Discussion

awood's avatar
awood
Qrew Member
2 months ago

Allow users to edit multiple forms

Hi all,

I have two forms - 2024 and 2025 versions of the same form. I would like to simultaneously allow users to:

  1. Click the edit button next to a record and be taken to a certain form (ex. 2024)
  2. Click a link and be able to edit either the 2024 or 2025 form

Right now #1 is working fine, but #2 brings up the "primary" form (aka the one that is set in the Forms menu for edit permissions for all roles) regardless of the form ID I use in the URL. 

Is there some way I can override what form is utilized for the URL fields? 

  • Clicking the edit button will always take the User to the default form based upon their Role in the application.

    You can build a custom button that will take the User to any form that you want to direct them to.   The logic about that can be as complex or as simple as you want.

    This variable defines a URL that will put the User on to the current record, in Edit Mode using form XX.

    var text URLEdit =

      URLRoot() & "db/" & Dbid() & "?a=er&rid=" &URLEncode([Record ID#]) &

      "&dfid=XX"&

      "&z=" & Rurl();

     

     

    • awood's avatar
      awood
      Qrew Member

      I have a URL field for each form with the formula:

      URLRoot()&"db/"&Dbid()&"?a=dr&rid="&ToText([2025 Record ID])&"&dfid=11"

      That brings them to the form with form ID 11, but when they hit edit it goes back to the role-based form. 

      When you say "build a button" is this a field I can add to a report (vs an element added to a form)? That's where the current links are, so that's where I would like the user to go to access either form. 

      • MikeTamoush's avatar
        MikeTamoush
        Qrew Commander

        It's always bugged me that if you use the native edit button, it edits on the default form, rather than the form the user is currently on. The work around, as you found in this thread is a custom edit button. 

        I haven't tested on new forms, maybe new forms will launch into edit mode based on the current form being viewed?

  • Your URL takes them to form 11, that is the a=dr part.

    If you use a=er then the User lands on form 11 in Edit Mode.

    If I was doing this I would build a Formula Rich Text field with two formulas, one for each of your forms.   Then with a little HTML in the field you can have that user click either one to go to the form they want.

    • awood's avatar
      awood
      Qrew Member

      Switching from dr to er worked great! I will look into the Formula Rich Text field now that the users can get to where they need to go. Thank you so much!