Returning to the parent from a child and a grandchild record

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

I am trying to create a "Save and Go Back" button that is on a child record as well as a grandchild record. I have a "Save and Resume" that works perfectly but I want the option to go back to the Parent.

Parent table is called: Problem Investigation - primary key is Record ID# but named Related Problem in the child table

Child table is called: PI Action Plan

Grandchild table is called: Participants

I've created a "Save & Go Back" formula URL on the child table with the formula below but it returns me to an "About:Blank" white screen.  I'm using Chrome.  Since I'm failing on child - haven't tried to replicate this on the grandchild table to return to the parent table. 

URLEncode(URLRoot() & "db/" & [_DBID_Problem_Investigation] & "?a=dr&rid=" & [Related Problem])

I am not a programmer - struggling my way through so please assume I don't have any foundation to draw upon.

Appreciate your help!

Photo of Anne

Anne

  • 100 Points 100 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of Jennifer

Jennifer

  • 20 Points
I do not have an answer to your question, but I'm dying to know your formula for "save and resume"! Do you mind sharing? How do you use this formula? Meaning, how do you change the existing formula in the "save" button. Or have you created a new "save" button?

And, I also am looking for a formula for "save and go back to parent", so I will be watching this space.
Photo of Anne

Anne

  • 100 Points 100 badge 2x thumb
Sorry for the delay - below is the code for save and resume.

Add a formula text field and allow some HTML text to be inserted into the field. Add the code below and then add the button to your form.  Hope it works out for you!

"<a class='Vibrant Success' onclick=$('#RedirectURL').val(document.location.href.replace(/&rl=[a-z0-9]*/,''));$('[name=rl]').val('');$('#saveButton').trigger('click'); href='#'>Save & Resume</a>"