6 Replies Latest reply on Jun 25, 2015 12:38 PM by ChelsiePierce

    Choose drop down template to autofill portal records

    ChelsiePierce

      Title

      Choose drop down template to autofill portal records

      Post

      Hello,

      Sorry if this has been answered before, I'm not sure what terms to search for and what I've searched hasn't come up with anything so far.

      Here's what I need:

      I have a Workflow (a series of tasks, some based on dates or completion of previous items, each item has an action ex. go to a list, send email, etc.). The Workflow has a specific order.

      I have multiple Workflows and I need to apply one, sometimes more than one, to a Job.

      I would like to be able to choose a Workflow Template from a drop down and have all the Workflow Items populated below in the correct order and with the corresponding action...and it needs to be a copy, not an updating link (I believe the terms are dynamic vs static?). I would also like to be able to edit the Workflow Items and/or add more after it is copied. 

      I've started with 2 tables, Workflow Templates and Workflow Items. My thought was to create the Workflow Items and assign them to a Workflow Template (WorkflowTemplateID)....but I'm pretty much lost after that. I know I can create a Portal of the Workflow Items on the Workflow Template form but it would just pull up the original ones and I need copies that I can edit without disturbing the original items.

      Any help would be much appreciated! Thank you!!

      Chelsie

        • 1. Re: Choose drop down template to autofill portal records
          philmodjunk

          Auto-enter field options can copy data from a related table. So if you use a value list or a selection portal to select a template, the ID thus entered into a match field can trigger a lookup action that copies data over from a related record. This single action can update multiple fields at the same time and the resulting data can then be edited directly in your current record.

          This is described in more detail as one of two options here: Auto Fill

          • 2. Re: Choose drop down template to autofill portal records
            ChelsiePierce

            Thank you! Can you elaborate how to set it up?

            A Job (JobID) has a workflow (WorkflowID) (or several) and each workflow has many items (WorkflowItemID). How do I set this up on a Job Form? Will the look up copy all associated items or just one? Does it have to be set up with dedicated fields to copy into or will a portal work?

            • 3. Re: Choose drop down template to autofill portal records
              philmodjunk

              without a script, it copies data from just one record into the field(s) of just one record. (Missed the import of that reference to a portal).

              If you have this basic relationship:

              Jobs----<Tasks
              Jobs::__pkJobID = Tasks::_fkJobID

              and you want to select a "workflow" in order to add a set of new related records in Tasks....

              Then you can set up this data model:

              TasksWorkflow>------WorkFlow>-----Jobs----<Tasks

              Jobs::_fkWorkFlowID = WorkFlow::__pkWorkFlowID
              WorkFlow::__pkWorkFlowID = TasksWorkFlow::_fkWorkFlowID

              Jobs::_fkWorkFlowID can be set up with a value list of work flows as well as a script trigger (OnObjectModify or OnObjectSave) that performs a script such as:

              set Variable [$JobID ; value: Jobs::__pkJobID ]
              Go To Related Record [Show only related records; From table: TasksWorkFlow ; Using layout: "TasksWorkFlow" (TasksWorkFlow ) ]
              Go to layout ["Tasks" (Tasks) ]
              Import Records [no dialog ; YourFIleNameHere ; Add ; Windows ANSI ]
              Replace Field Contents [no dialog; Tasks::_fkJobID ; $JobID ]
              Go to Layout [original layout]

              This allow you to select a work flow from the value list and see new tasks records for that work flow appear in the portal. You can even do this more than once to build a list from several specified workflows.

              Note that you set up import records exactly like you would to import records from another file, but select the file that you already have open in that step of the process. You then need to map fields from TasksWorkFlow to Tasks in your field mapping dialog that is part of import records.

              • 4. Re: Choose drop down template to autofill portal records
                ChelsiePierce

                Awesome, thank you! I had most of this set up but not the outside file part. Is that the only way to get the records (from an outside file?) There's no way to get them from a table within the database?

                • 5. Re: Choose drop down template to autofill portal records
                  philmodjunk

                  You misunderstand me. There is NO outside file. I said that you use the same steps as IF you were importing from an outside file, BUT pick the same file you already have open when you select a file for your import.

                  • 6. Re: Choose drop down template to autofill portal records
                    ChelsiePierce

                    Oh ok! Gotcha!

                    You are awesome...worked perfectly!! Thank you soooooo much!!