Discussions

Expand all | Collapse all

How does the ""&z="" function work?

  • 1.  How does the ""&z="" function work?

    Posted 06-25-2018 16:31
    I found a post on here that recommended using "&z="&Rurl() at the end of a GenAddRecord formula in order to, upon saving the opened form, redirect the user back to where they started from. This works great, but I would like to understand what's going on, because these functions seem useful in a variety of situations. 

    So the way I think it works is that "&z=" tells the form where to go after the save button is clicked. Does that mean Rurl() is just the url of the record, and I could put any url in there to customize this function? 

    Thanks


  • 2.  RE: How does the ""&z="" function work?

    Posted 06-25-2018 16:35
    if you use the syntax like

    var text AddRecordForm = ... and put your GenAddRecordForm URL here;

    var text DoSomethingNext = and put your next URL here;

    then you can do this

    $AddRecordForm 
    & "&NextURL=" & URLEncode($DoSomethingNext)


  • 3.  RE: How does the ""&z="" function work?

    Posted 06-25-2018 17:03
    Thanks


  • 4.  RE: How does the ""&z="" function work?

    Posted 06-25-2018 17:14
    The z= .. syntax does something that you cannot replicate in any other way, as far as i know.  For example, if you launch off a report with dynamic filers set to add a record, it will return you to that same report  and preserve the Dynamic filters.


  • 5.  RE: How does the ""&z="" function work?

    Posted 06-25-2018 17:17
    So is it only used as z=Rurl? I thought it might be a more flexible option, say if I wanted to redirect to a specific record after a user fills in a GenAddRecord form. 


  • 6.  RE: How does the ""&z="" function work?

    Posted 06-25-2018 17:26
    I don't believe you can mess with that z=rul.  it does what it does in that syntax.  But you can use the NextURL syntax if you know where you want to go to after the record is saved.


  • 7.  RE: How does the ""&z="" function work?

    Posted 06-25-2018 17:28
    So I can't, say, take information from the record that is being launched from, and then use that to inform where the user goes after they click the save button? 


  • 8.  RE: How does the ""&z="" function work?

     
    Posted 06-25-2018 18:06
    Here is a good article for you to check out: https://community.quickbase.com/quickbase/topics/using-z-rurl-and-rdr-in-formula-url-fields 

    Should answer your questions,

    ~Rob


  • 9.  RE: How does the ""&z="" function work?

    Posted 06-25-2018 18:09
    Funny, that's actually where I got the question from. The article doesn't really go into what exactly "&z="&Rurl() is, just what its most common use cases are. 


  • 10.  RE: How does the ""&z="" function work?

     
    Posted 06-25-2018 18:35
    Ah, I gotcha. 

    Well, the way I read it is that it was introduced as a hack and can only be used in two ways (or really one way that can be arrived at in two ways). 

     

    I wouldn't incorporate it into my stuff outside of the very narrow description offered in that article and probably wouldn't do it even then if I could help it.  Which, apparently I have because I can't recall using it to date.    

    Let me know what you learn though.  You may find some cool stuff.

    Thanks,

    ~Rob


  • 11.  RE: How does the ""&z="" function work?

    Posted 06-25-2018 18:37
    Ah well it's still useful even in this one narrow situation I suppose. And I can use the NextUrl thing for other situations. 

    Thanks