Getting Started

 View Only
  • 1.  Shining light on the copyParentChild-Select function

    Posted 03-04-2021 11:32
    Edited by John Ross 03-04-2021 11:35
    Can anyone shine any light on the copyParentChild-Select function?  We have a URL button in a legacy application that I am trying to re-create in a new application.  For the life of me I cannot get it to work in the new application even those the structure and usage is the same.  (The old one works fine, and has for many many years.)

    Specifically, the main part of the code looks like this:  (Note that I edited the table codes to table 1, 2, etc, for ease of readability)
    "javascript:void(window.open('" & URLRoot() &"db/" & Dbid() & "?a=dbpage&dbid=" & [_DBID_STAGING_TYPE]
    & "&pagename=copyParentChild-Select.html&onlyDBIDs=Table1.Table2.Table3&rid=" & URLEncode([Project Staging Type - Record ID#])
    &"&dest=refresh&destrid=null&Table1-43=" & URLEncode([Staging ID]) & "&Table2-32=" & URLEncode([Staging ID]) & "&Table3-32=" & URLEncode([Staging ID])
    & "&Table1-45=" & URLEncode(Today())
    & "&Table1-44=" & URLEncode([Related Job])
    & "&Table2-35=" & URLEncode(Today())
    & "&Table2-33=" & URLEncode([Related Job])
    & "&Table3-34=" & URLEncode(Today())
    & "&Table3-32=" & URLEncode([Staging ID])
    & "','copyRecursive','top=240,left=320,width=400,height=150,location=no,menubar=no,toolbar=no'))"​

    Thanks guys and gals



    ------------------------------
    John Ross
    ------------------------------


  • 2.  RE: Shining light on the copyParentChild-Select function

    Posted 03-04-2021 13:45
    This is custom javascript calling a code page called 

    copyParentChild-Select.html​



    If you need to make a typical copy master detail button, use the built in wizard to make the button for you.  It is located under stetting for the app and then app management and then copy master detail.

    What is it that you want the button to do.



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



  • 3.  RE: Shining light on the copyParentChild-Select function

    Posted 03-05-2021 09:25
    Hi John:

    QuickBase is migrating away from allowing NEW use of javascript in buttons.

    You might try excluding the javascript portion and go right to the dbpage.  In essence you would be trimming off the portion that opens in a new window.

    You'd be removing this off the front:
    "javascript:void(window.open('" & ​
    and remove this on the end:
    & "','copyRecursive','top=240,left=320,width=400,height=150,location=no,menubar=no,toolbar=no'))"​​
    Leaving you with:
    URLRoot() &"db/" & Dbid() & "?a=dbpage&dbid=" & [_DBID_STAGING_TYPE]
    & "&pagename=copyParentChild-Select.html&onlyDBIDs=Table1.Table2.Table3&rid=" & URLEncode([Project Staging Type - Record ID#])
    &"&dest=refresh&destrid=null&Table1-43=" & URLEncode([Staging ID]) & "&Table2-32=" & URLEncode([Staging ID]) & "&Table3-32=" & URLEncode([Staging ID])
    & "&Table1-45=" & URLEncode(Today())
    & "&Table1-44=" & URLEncode([Related Job])
    & "&Table2-35=" & URLEncode(Today())
    & "&Table2-33=" & URLEncode([Related Job])
    & "&Table3-34=" & URLEncode(Today())
    & "&Table3-32=" & URLEncode([Staging ID])​

    I have done this with a number of other buttons to avoid the javascript warning/inhibition.  I don't have your environment to test but you should be able to go directly to the page.




    ------------------------------
    Kirk Trachy , Senior Solutions Consultant
    QuickBase | 603-674-5454 M | ktrachy@quickbase.com
    ------------------------------