This topic is locked

Adding multiple rows to a table via multiple select values in a field

1/30/2009 1:49:28 PM
ASPRunnerPro General questions
S
soberholtzer author

I need to know if this is possible:
I have three tables: Process, Subprocess, and ProcessDetails. My intent is to create an Add page for Process Details and have a user able to select multiple Subprocesses (using lookup wizard to display all values in the SubProcess table) to associate with a single process. However, want to add a record in the ProcessDetails table for each Subprocess that is selected. Currently, if a user selects multiple Subprocesses to associate with a process on the add page, it creates one record with multiple values in the SubProcess field.
Please help!

J
Jane 2/4/2009

Hi,
you can parse entered values and add it to the table manually in the Before record added/Before record updated events on the Events tab.

Here is just a sample:

str=dict("FieldName")

dim arr

arr=split(str,",")

for i=0 to ubound(arr)-1

'save each record manually here

response.write "value #" & i & ": " & arr(i) & "
"

next


To save value use Save new data in another table action as a sample.