Forum Discussion

MichaelTamoush's avatar
MichaelTamoush
Qrew Captain
6 years ago

Return URL function doesn't work cross app?

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
------------------------------
  • 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
    ------------------------------
    • MichaelTamoush's avatar
      MichaelTamoush
      Qrew Captain
      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
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        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
        ------------------------------
  • BabiPanjikar's avatar
    BabiPanjikar
    Qrew Assistant Captain
    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
    ------------------------------
    • MichaelTamoush's avatar
      MichaelTamoush
      Qrew Captain
      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
      ------------------------------
      • BabiPanjikar's avatar
        BabiPanjikar
        Qrew Assistant Captain
        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
        ------------------------------