Forum Discussion

SMK's avatar
SMK
Qrew Trainee
5 months ago

Redirect to same page in form

Hi, 

I have this formula URL where the user submits all branch. when the user clicks the button it comes the chrome prompt of Leaving the site? (Picture below) 

This the code i have written in the formula url field: 

var text markCompleted = 
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & "&apptoken=" &
"&rid=" & URLEncode([Record ID#]) &
"&_fid_921=1" &
"&rdr="&URLEncode( URLRoot() & "db/" & Dbid() & "?a=er&dfid=34&rid=" & ToText([Record ID#]) & "&page=15")

$markCompleted


Can someone help me fix this? 

**I have remove the token. 

5 Replies

  • No problem. This is probably a very old app. Go to the Table Advanced Settings and set this setting to check

    Auto save when redirected away from the page.

    that has been the default for many years, so this must be an old app that is still defaulted to be unchecked

     

  • I am not seeing any syntax errors in your formula. 

    Are you running this button in Add Mode or in Edit Mode?  It is not going to run in Add Mode as constructed.

  • SMK's avatar
    SMK
    Qrew Trainee

    Hi Mark, 

    I have this setting checked already. I am using the same structure of the formula URL in other button with different field ID and page number everything else is the same which works as intended. 

  • SMK's avatar
    SMK
    Qrew Trainee

    Hi Mark, 

    Yes, it is on add mode. How would I do it in Edit Mode?

    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      That syntax should work in edit mode.  If you need something to work in add mode can you describe what you re trying to accomplish?  In addition mode why not just have the user check the box.