Discussions

Expand all | Collapse all

How to Add Many Records in seperate table from a form URL Formula button

  • 1.  How to Add Many Records in seperate table from a form URL Formula button

    Posted 30 days ago
    I am looking to create a formula URL button that creates multiple tasks associated with a single project.  Each task is unique with a different task name BUT it does follow a template so all tasks are the same for each project at project creation.  I have a successful formula to make a single task related to the parent record in the task table but I want to have a button that creates multiple tasks as I set them up based on the template all related to the same project.  

    I believe I have to use the var text URLONE = ( approach but I don't know how to tie them together and have the page redirect back to the original page.

    Working Code for Single Task Creation:
    URLRoot() & "db/" & [_DBID_XXXX] &"?a=API_AddRecord&_fid_48="& URLEncode ([Project]) &
    "&_fid_23="&URLEncode ("Custom Title") &
    "&_fid_6= "&URLEncode ("Template Text") &
    "&_fid_16="&URLEncode ("Template Text") &
    "&_fid_67="&URLEncode (ToText("User Email"))&
    "&_fid_13="&URLEncode ("Template Text")) &

    "&rdr=" &

    URLEncode(URLRoot() & "db/" & Dbid() &
    "?a=dr&rid=" & [Project])

    How do I make a single click create up to 13 tasks with different default assignments and text?

    ------------------------------
    Joshua Case
    ------------------------------


  • 2.  RE: How to Add Many Records in seperate table from a form URL Formula button

    Posted 30 days ago
    I suggest that you use the native functionality to have the system create either a duplicate of an existing project, with children tasks, or else you can create a button which will import a standard set of task from a template project into the Project you are on when you click to import.  If you have more than 1 kind of standard projects, then create say two standard template projects.  When you put the buttons(s) on the form, I suggest making a summary field to count the # of children and hide the button(s) once the Project has children tasks or your user may click twice and double import. 

    Set the Permissions so no one but the Admin can add or delete either the Template Projects (say have a flag field on the Project to indicate it is a Template Project) and also not allowed to edit Template children. 

    The wizard to create the button for you is located in Settings (for the app), then App Management, then look for Copy Master Detail.  The wizard will guide you though making the button(s).





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



  • 3.  RE: How to Add Many Records in seperate table from a form URL Formula button

    Posted 29 days ago
    Was getting an error when using this method because of some loop...

    I believe its because of the tables in this app or connected in a lot of ways.  Also, this is a very old app and needs to be cleaned up!  Yayy me!  

    I fixed my code though based on an answer you provided to someone else using the Var text method.  My error was not including the redirect to the current project I want to load tasks to as var text three and then linking them together at the end.  Works and I am off to set this up and run with it.  

    Thank you!

    ------------------------------
    Joshua Case
    ------------------------------



  • 4.  RE: How to Add Many Records in seperate table from a form URL Formula button

    Posted 29 days ago
    Mark,

    I have run into an issue now of course.  How do I tie my code past the third line?

    Currently, I have:

    $URLONE & "&rdr=" &
    URLEncode($URLTWO)&
    URLEncode("&rdr=" & URLEncode($URLTHREE))&
    URLEncode("&rdr=" & URLEncode($URLFOUR))&
    URLEncode("&rdr=" & URLEncode($URLFIVE))

    I get an error and only 3 tasks get created.  I assume I am missing the correct redirect pattern but I can't figure it out.  Am I limited to only 3?

    ------------------------------
    Joshua Case
    ------------------------------



  • 5.  RE: How to Add Many Records in seperate table from a form URL Formula button

    Posted 29 days ago
    Here is the generic format for up to 7 redirects.  Slice off as much of the salami as you need.  I have no idea why the nesting of the URLEncoding is required, but it just is.

    $URLONE
    & "&rdr=" & URLEncode($URLTWO)
    & URLEncode("&rdr=" & URLEncode($URLTHREE))
    & URLEncode(URLEncode("&rdr=" & URLEncode($URLFOUR)))
    & URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLFIVE))))
    & URLEncode(URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLSIX)))))
    & URLEncode(URLEncode(URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLSEVEN))))))

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



  • 6.  RE: How to Add Many Records in seperate table from a form URL Formula button

    Posted 29 days ago
    Thank you!!

    ------------------------------
    Joshua Case
    ------------------------------