I am trying to create a button that saves a form and directs back to a specific section on the main form.

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
I am trying to have a button save the record and go back to the main form but at a certain location. So far I have been been able to create an anchor on the main page and coded a button that allows the page to jump to that anchor with the following formula "javascript:void(window.location.href='#CorrectiveAction');" that works perfectly.

The part I can not figure out is how to manipulate the window.location.href part to point to a different page, nor how to incorporate it into my other save button which has the following code:

URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &     "&apptoken=cmtb6wg25hfq8dm7huhzcpi3r64" &     "&_fid_76=Root Cause Complete" &    
"&_fid_422=" & ToText(Now()) &  
"&_fid_425=" & ToText(User()) &     
"&rdr=" &   
URLEncode(URLRoot() & "db/" & Dbid() &        
 "?a=er&dfid=2&rid=" & [Record ID#]).

Any help would be appreciated!
Thank you - Jochen
Photo of JOCHEN

JOCHEN

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,332 Points 50k badge 2x thumb
Try just suffixing your last code with #CorrectiveAction



URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & 
"&rid=" & [Record ID#] &     "&apptoken=cmtb6wg25hfq8dm7huhzcpi3r64" &     "&_fid_76=Root Cause Complete" &    
"&_fid_422=" & ToText(Now()) &  
"&_fid_425=" & ToText(User()) &     
"&rdr=" &   
URLEncode(URLRoot() & "db/" & Dbid() &        
 "?a=er&dfid=2&rid=" & [Record ID#] & "#CorrectiveAction")
Photo of JOCHEN

JOCHEN

  • 0 Points
Mark,

That was super easy and works flawlessly! Now that you point it out was obvious enough I should have been able to figure that out on my own!!

Thanks for the quick response!!

-Jochen