Discussions

Expand all | Collapse all

New Redirect (Doredirect)

  • 1.  New Redirect (Doredirect)

    Posted 04-12-2021 18:47
    Has anyone used the new 'doredirect' functionality? Are there any examples or instructions for implementing this bit of code that was updated in the last relaese?

    I think the basics is ""?a=doredirect&z=" &Rurl())

    but I am not sure if you have to specify the table first, or if there is a way to add that code and have it simply redirect to where the person was when they pressed the formula button?

    ------------------------------
    Mike Tamoush
    ------------------------------


  • 2.  RE: New Redirect (Doredirect)

    Posted 04-12-2021 19:04
    Here is an example doing three URL calls and then refreshing the page. It's a silly example where I separately edit the same record three times, but I was just trying to test.



    var text URLONE = URLRoot() & "db/" & [_DBID_PARENTS] & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_6=today";
    var text URLTWO = URLRoot() & "db/" & [_DBID_PARENTS] & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_11=now";
    var text URLTHREE = URLRoot() & "db/" & [_DBID_PARENTS] & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_12="
    & not ([Checkbox]);

    var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();



    $URLONE
    & "&rdr=" & URLEncode($URLTWO)
    & URLEncode("&rdr=" & URLEncode($URLTHREE))
    & URLEncode(URLEncode("&rdr=" & URLEncode($RefreshPage)))

    The main point is that you need his whole string to refresh the page

    URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();

    so, for example if it was just 1 URL to execute and Refresh the page it would be

    $URLONE
    & "&rdr=" & URLEncode($RefreshPage)

    or else in long form that I don't use as I far prefer small code parts to debug ....

    URLRoot() & "db/" & [_DBID_PARENTS] & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_6=today"
    & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl())










    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: New Redirect (Doredirect)

    Posted 04-12-2021 20:34
    Do you know if you can use this to redirect if you started in a different table?

    i.e: I'm in a record with an embedded report link from another table. If I have a button press in that report link, is it possible to use doredirect to navigate back to the form where you started? (the 'parent' record....even though technically it might not really be a parent, but for the purpose of this example we can pretend its a child table with a button, that is pressed from the embedded report link on the parent table)

    ------------------------------
    Mike Tamoush
    ------------------------------



  • 4.  RE: New Redirect (Doredirect)

    Posted 04-12-2021 20:40
    I don't think I personally tested that but yes that is the intent of the code. It is remembering what page you were on when you click he button, even if it was on an unrelated child table Report Link. 

    It is like an F5 refresh the page type function.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: New Redirect (Doredirect)

    Posted 04-12-2021 20:57
    I'll have to test but then I wonder if the Dbid() will be the table from where you are currently sitting? Hmmm

    ------------------------------
    Mike Tamoush
    ------------------------------



  • 6.  RE: New Redirect (Doredirect)

    Posted 04-12-2021 21:09
    I tested and it just refreshes whatever page you are on.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 7.  RE: New Redirect (Doredirect)

    Posted 04-13-2021 10:41
    Edited by Mike Tamoush 04-13-2021 11:20
    So with testing, it appears this only works when launching from form. Which is awesome. Unfortunately, if you launch from a report it doesn't know what to do and throws you on the table homepage.

    Still a great add, too bad it doesn't work from reports!

    UPDATE: Not entirely true. Seems to return me to my report in most cases, I am trying to recreate the case where it didn't work. Ill update this post if I come up with it. Perhaps just operator error?

    ------------------------------
    Mike Tamoush
    ------------------------------



  • 8.  RE: New Redirect (Doredirect)

    Posted 04-13-2021 11:59
    I just tested on the report and it worked perfectly for me.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 9.  RE: New Redirect (Doredirect)

    Posted 26 days ago
    I am encountering this problem, too, that when my button is embedded in reports it doesn't return me to where I started but instead returns me to the app home page. In testing I discovered that when I put my whole URL in an If() statement the URL inside that If() statement doesn't work correctly. When I pulled the URL out of the If() statement it then worked exactly as described. I wanted to be able to toggle off my button under certain circumstances but apparently that will not be an option?

    Example:
    var text URL = URLRoot() & "db/" & [_DBID_PARENTS] & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_6=today";
    var bool boolA = true/false;

    If($boolA, $URL & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()),"")

    ------------------------------
    Jill Engle
    ------------------------------



  • 10.  RE: New Redirect (Doredirect)

    Posted 25 days ago
    Jill, it's not clear from your post where you are trying to land the user if not just refresh the page.  If you can explain that, there will be a solution.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 11.  RE: New Redirect (Doredirect)

    Posted 25 days ago
    Yes, I would like the button to redirect the user to wherever they were when they clicked the button. The button worked that way in a form but did not work to return the user to a table report.

    ------------------------------
    Jill Engle
    ------------------------------



  • 12.  RE: New Redirect (Doredirect)

    Posted 25 days ago
    Can you post what code you are using.  Why are you messing around with that toggle concept.  Why not just 

    var text URL = URLRoot() & "db/" & [_DBID_PARENTS] & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_6=today";

     $URL 
    & "&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl())

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 13.  RE: New Redirect (Doredirect)

    Posted 25 days ago
    The button triggers an email to send but it doesn't happen instantly so I want the button to disappear until the email has actually gone out. People are a little "button happy" around here so I want to keep them from clicking it multiple times in a row and sending multiple emails while they are waiting for the email to go through. 

    var text URL= URLRoot() & "db/" & [_DBID_TABLE] & "?act=API_EditRecord"

    & "&rid="&[Record ID#]

    & "&_fid_2232=" & Now()

    & "&apptoken=###";

    var datetime sent = [Courier: Welcome Email - Date Sent];
    var datetime triggered = [Courier: Welcome Call Email - DateTime Triggered]; //fid_2232
    var bool triggerBlank = IsNull($triggered);

    var bool showButton = $triggerBlank or $sent>=$triggered;

    If($showButton,$URL & "&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()),"")

    ------------------------------
    Jill Engle
    ------------------------------



  • 14.  RE: New Redirect (Doredirect)

    Posted 25 days ago
    ... so what is not working.  Based on the that you are showing it seems to me the button will be visible, the user will push the button, the page will refresh and the button will be blank upon refresh.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 15.  RE: New Redirect (Doredirect)

    Posted 25 days ago
    What you've described is what I was hoping it would do. Instead when the button is visible, the user pushes the button, the page refreshes and returns to the app home page instead of to the report the user was on when they pushed the button.

    ------------------------------
    Jill Engle
    ------------------------------



  • 16.  RE: New Redirect (Doredirect)

    Posted 25 days ago
    We are clearly understand each other right now. That is the good news. The bad news is I agree it feels buggy. I think you have to put in a support ticket.  I have looked at your formula a few times and I really cannot see any syntax errors with it.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 17.  RE: New Redirect (Doredirect)

    Posted 25 days ago
    Jill,

    I still have the same problem as you - except not consistently. I am banging my head against the wall trying to figure out the series of steps I take that causes it to return to the home page, because as soon as I am convinced it does, I try it again and it works perfectly. I'll post back on this thread if I come up with anything, you do the same!

    I came here because it wasn't working for me, so I was going to describe in detail what was happening. I went to test and, boom. Worked. ????

    ------------------------------
    Mike Tamoush
    ------------------------------



  • 18.  RE: New Redirect (Doredirect)

    Posted 25 days ago
    Thanks Mike and Mark! I will put in a support ticket and report back if I learn anything new. I appreciate the help!

    ------------------------------
    Jill Engle
    ------------------------------



  • 19.  RE: New Redirect (Doredirect)

    Posted 25 days ago
    Great, if you can replicate a solid example, they will be able to isolate the bug.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 20.  RE: New Redirect (Doredirect)

    Posted 23 days ago
    Hi Everyone,

    I checked in with our Care team and we have seen some inconsistent behavior in redirects that has been identified as a bug. If you are seeing these issues you would definitely want to submit a support case and that way we can tie your case to the bug and notify you when it is resolved.

    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quickbase
    ------------------------------



  • 21.  RE: New Redirect (Doredirect)

    Posted 23 days ago
    Thanks Evan! Yes, I did submit a support case and was told that yes this is an identified bug and that I will be notified when it's been resolved. 

    Jill

    ------------------------------
    Jill Engle
    ------------------------------



  • 22.  RE: New Redirect (Doredirect)

    Posted 04-15-2021 10:42
    Thanks so much Mark for showing those examples, we also updated our original article on redirects to include examples of how the new functions work and you can find it here. If you see any examples that would be helpful we are missing certainly let us know.

    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quickbase
    ------------------------------