4 Replies Latest reply on Nov 5, 2014 7:07 AM by beverly

    Projects Starter Solution - Need Help

    jmsver

      Hello all,

       

      This is my first post, and I am still pretty much a novice with FM. I've begun creating a database using the Projects starter solution. I was wondering if there was anyway to create a default set of tasks that would appear everytime a new project was created?

       

      Thanks

        • 1. Re: Projects Starter Solution - Need Help
          mikebeargie

          Sure, you will need to do the following:

           

          1) Modify the custom menu so that the "new record" menu item runs a script.

          2) Create a "new project" script, that runs a check to see if you're on a projects layout ( Get(LayoutTableName) = "Projects" ), adding tasks if that is true, or just creating a new record if it's another table.

          3) Create the actions in your new project script that create your new tasks. I would start by copying from the "Add Task from Project [+]" script.

          4) testing and modifying...

           

          For creating the tasks, you could easily loop through a list, something like this:

           

          Set Variable [ $list ; List( "task1" ; "task2" ; "task3" ; etc..) ]

          Loop

             Set Variable [ $i ; $i + 1 ]

             ----create new task----

             Set Field [ tasks::description ; GetValue($list;$i) ]

             Exit Loop If [ $i = ValueCount($list) ]

          End Loop

           

          This would allow you to easily modify the $list any time you want to update the defaults.

          • 2. Re: Projects Starter Solution - Need Help
            beverly

            Welcome, jmsver, only if you create a "database" with those tasks, save it as 'template' and then create a copy of it each time you want to create a new database.

             

            You can copy/paste many things between databases, but to get other items, you must re-create. So the template/starter database is helpful.

             

            Beverly

            • 3. Re: Projects Starter Solution - Need Help
              jmsver

              Thanks for the quick response Mike, I'll give this a go.

              • 4. Re: Projects Starter Solution - Need Help
                beverly

                I totally missed the question! Mike to the rescue.

                 

                Beverly