How to use a formula URL button to open the record in edit mode BEFORE changing the value of a field?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I use Formula-URL buttons for approving or rejecting orders, when the Reject button is clicked, the "Approval Status" field changes to "Rejected", the form opens in edit mode, and then a "Reason for Rejection" field appears and becomes required (form rule).

The problem: using this method, a user could click the reject button, which changes the approval status to Rejected, and then exit out of the form without typing in a Reason for Rejection.

Is there a way to instead, when the Reject button is clicked, to first open the record in edit mode, then populate the status field, which would then trigger the show/require rule for Reason for Rejection? That way, if no reason is entered, the approval status doesn't actually change?

Photo of Matthew

Matthew

  • 60 Points

Posted 3 years ago

  • 0
  • 1
Photo of Blake Harrison - DataBlender

Blake Harrison - DataBlender, Champion

  • 100 Points 100 badge 2x thumb
It sounds like you're doing 2 calls to the record - one to edit the record status and another to take the user to the form in Edit mode. Is this correct?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,208 Points 50k badge 2x thumb
I don't think that the a=er will accept parameters for the values for the field. (for example the usual "&_fid_99=Rejected")  They have no effect as the a=er is not a real API.
Photo of Matthew

Matthew

  • 60 Points
Agreed, a=er doesn't change any field values, and if it did, I'm not sure if it would work with read only fields. Is there another call or a combination of calls that I could use?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,208 Points 50k badge 2x thumb
I think that to Reject you just need to put the user into Edit mode and have them do the whole update including the Accept Reject, manually.
Photo of Matthew

Matthew

  • 60 Points
Our buttons are a big part of our application though, we're basically re-building two of our apps into a single new one, and a problem that we had on our old apps was that there was too much data entry, so we designed our new app to basically accomplish 80% of our processes using buttons.. I'm open to unconventional methods as well
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,208 Points 50k badge 2x thumb
Well, you could safety it by having a Subscription report to go to the [last modified by] for Rejections without reasons.
You could also ensure that the reject choice is shown as a radio button instead of a drop down list. One less click that way.
Photo of Blake Harrison - DataBlender

Blake Harrison - DataBlender, Champion

  • 100 Points 100 badge 2x thumb
You could have the button update a 2nd field that could then be used to push the value to the Status field by a form rule on save. It's certainly not the best solution, but it should work if you setup the form rule well.
Photo of Matthew

Matthew

  • 60 Points
Blake, I like your idea, like a sort of rouge field.. I could have that 2nd field visible during the edit to show as if the change already went through, and on save like you said push the value to the other field, and then hide that second one and show the real field.
I was hoping there could be a way to do this through a formula, but if it works......