Discussions

 View Only
Expand all | Collapse all

Return URL function doesn't work cross app?

  • 1.  Return URL function doesn't work cross app?

    Posted 10-23-2019 14:50
    Hi all. It seems there is a bug right now in the return URL when utilizing in a cross app functionality, and I am wondering if anyone has found this same bug, and has a work around. I'm hoping I'm wrong, but am not optimistic as I spent time with Kirk Trachy in office hours and he thought the same thing.

    The issue is this - when you create a table to table relationship, it creates an 'add xxxx' button to add an entry on your child table. The url coding is generically as follows:

    URLRoot() & "db/bpywdcwyf?a=API_GenAddRecordForm&_fid_20=" & URLEncode ([Record ID])& "&z=" & Rurl()

    Kirk has informed me that the last part of that line is to return you to the url you came from, so you aren't stuck in the child table. This works perfectly when done in the same app.

    However, when the tables are in different apps, it does not return you. My users end up floating around in my master tables app.

    Is anyone else encountering this, and have they found a work around? Is it indeed a programming bug or is it simpler than that and I am just doing something wrong?

    Thanks!!

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


  • 2.  RE: Return URL function doesn't work cross app?

    Posted 10-23-2019 15:23
    I just replicated that bug and it does seem like a bug to me.

    A work around is this syntax which will erdirdct on save to another URL - that being the parent that you launched from

    var text ADD = URLRoot() & "db/xxxxxxxx?a=API_GenAddRecordForm&_fid_69=" & URLEncode ([Record ID#])
    & "&_fid_6=" & URLEncode([Request Title])
    & "&_fid_10=Active";

    var text DisplayParent = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" &[Record ID#];

    $ADD
    & "&NextURL=" & URLEncode($DisplayParent)

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



  • 3.  RE: Return URL function doesn't work cross app?

    Posted 10-23-2019 17:58
    Thanks Mark. I'm not sure I understand what field ID's I use in the three fid spots in your programming, nor what the [Request Title] field represents?


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



  • 4.  RE: Return URL function doesn't work cross app?

    Posted 10-24-2019 11:12
    I had just grabbed an actual working example from one of my apps and I was also populating some extra fields.

    You can just do this if there are no extra fields to populate other that populating the field for Related Parent.

    var text ADD = URLRoot() & "db/xxxxxxxx?a=API_GenAddRecordForm&_fid_69=" & URLEncode ([Record ID#]);

    var text DisplayParent = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" &[Record ID#];

    $ADD
    & "&NextURL=" & URLEncode($DisplayParent)


    In the example above, field ID 69 was the field for [Related Parent] on the child record.

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



  • 5.  RE: Return URL function doesn't work cross app?

    Posted 10-24-2019 13:13
    Thanks!! I'm getting an error if I save or cancel, saying that the project not found. The redirect isn't working and I'm not sure why?

    My code and error below. Please note my Primary key field is not record id, but project id

    var text ADD = URLRoot() & "db/bpz68jg3u?a=API_GenAddRecordForm&_fid_59=" & URLEncode ([Project ID]);
    var text DisplayParent = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" &[Project ID];
    $ADD
    & "&NextURL=" & URLEncode($DisplayParent)



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



  • 6.  RE: Return URL function doesn't work cross app?

    Posted 10-24-2019 13:21
    for this code here
    &rid=" &[Project ID];

    either you need to use rid and then populate it with the [Record ID#] field 

    or else use

    &key=" & [Project ID];


    if the Key field is not the Record ID# field.  Did you select a different field to be the Key field?


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



  • 7.  RE: Return URL function doesn't work cross app?

    Posted 10-24-2019 13:24
    Yes, I changed the key field. I see, rid is record id.... ;) 

    IT WORKED. Thank you!!! you are a lifesaver!!!

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



  • 8.  RE: Return URL function doesn't work cross app?

    Posted 10-23-2019 23:14
    Hi Mike,

    Rurl() currently seems working within the current app only. This seems to be a bug  when it comes to different apps as it defeats the purpose. The only way is to manually redirect using hard coded db id.

    ------------------------------
    Babi Panjikar
    ------------------------------



  • 9.  RE: Return URL function doesn't work cross app?

    Posted 10-24-2019 11:07
    Babi,

    Can you explain how I would manually redirect? I'm trying to use Marks suggestion but am unclear on some of his references to field id's.

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



  • 10.  RE: Return URL function doesn't work cross app?

    Posted 10-24-2019 23:57
    Mark's response with use of second variable for redirect url is what I talked about.  

    var text DisplayParent = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" &[Project ID] 

    Sometimes its freeky to use Dbid() for redirect , so suggested approach is to create a formula field text field within your table and mention the dbid there.
    Example:   CF-ParentDBID (Formula text) = "<put the dbid>"
    var text DisplayParent = URLRoot() & "db/" & [CF-ParentDBID] & "?a=dr&rid=" &[Project ID]  


    ------------------------------
    Babi Panjikar
    ------------------------------



  • 11.  RE: Return URL function doesn't work cross app?

    Posted 10-25-2019 05:27
    Edited by Mark Shnier (Your Quickbase Coach) 10-25-2019 06:25
    Dbid() just means the Table that the button is on.  Just a short form for ease of use.

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