I am not quite clear on if the materials come in a set for each course or if they can be individually selected. For example Course1 has three material items and the student can request only #1 and #3. Are any of the materials duplicated between courses? Is this system only accessed by staff?
The easiest way to do this would be along the lines you are thinking. I would use a portal on a special layout and your list of values to loop through portal rows adding new entries. How this gets done depends a little on if the materials are in a kit or individually requested. Doing this with PSOS would insulate the user from waiting or seeing the process. Although the wait should not be long.
Prepare yourself for parsing text. You will likely be using Pattern Count, Position, LeftWords and RightWords to pull the correct information from your list depending on how it is built and create shipping orders. Possibly ExecuteSQL for certain things depending on the whole setup. You might consider a return delimited list that looks like this in the end:
This will take some work using a calculated field or global variable. You will need to build the initial list with the purpose of parsing it. This means that you will have to consider you checkbox will add "C3+M1" and using the "+" as a means to navigate. You can keep a separate unrelated table for looking up specific values related to C3 and M1 for creating your shipment requests. For Example to get an item SKU ExecuteSQL( "SELECT sku FROM yourtable WHERE course = ? AND material = ?"; ""; ""; C3; M1)
There are all different kinds of ways to do this though.
Hey Tom - The actual materials are actually not itemized. It's the courses that seem to be my stumbling block.
The Student, say John Doe, is taking multiple courses, course_1, course_2, and course_3. The checkboxes for these can be individually checked:
Now, say John Doe calls and says I need stuff for just course_1 and course_3. I would look up John via his ID number and I would check the boxes next to courses 1 and three:
When I click "Submit", the script goes in and says "Ok, I need to add a shipment record for John Doe for course_1. I can ignore course_2. I need to add a shipment record for John Doe for course_3."
I see. I'm driving right now. Will get back to you in a few minutes.
You need a layout with your temp field and a portal to add new shipment records. Go to this layout after submit button. You will also need the student ID or info but you can pass that though a variable or have the fields in the layout.
Basically you need one temp field that is used for all the courses. Maybe a global field.
Each instance of the field will have a different value list. This way when each check box is checked it will give you a return delimited list in the field. You can use pattern count to determine how many total so you can use a loop in the script n number of times. PatternCount (field; "Course") for example. Set this in a variable.
Then you need to simply go to last portal row and enter the needed info for a new shipment record. Changing the variables with each iteration through the values in the list. Use Position for this. With the occurrence being your iteration in the loop. You could go to the shipment record layout directly but I have found this method with a portal can be faster.
I am sure you might want to add some way to track if the materials were already shipped if they are requested more than once.
If you need more detail let me know.