creating an automated table in a form based on (variable) information from other fields
Posted on 2006-06-15
This is a tricky one I think and I'm not sure it's possible. Within a form I need to create a table. The table needs 4 columns and needs to be created automatically depending on information within a names field "reviewers" that allows multiple entries. For each name entered (using the address book lookup - the number of names entered will vary on each form but probably won't exceed six) we need a row created in the table, so the number of rows will depend on how many names are entered in the "reviewers" field. The first column will contain the computed name from "reviewers". The second column will contain a computed field which displays a tickbox which appears when that person presses a button called "Review Accepted" (the button is already contained within the form). The third column contains a computed field which displays a tickbox when that person presses a button called review complete (button already contained within the form). The forth column is an editable rich text field which the reviewer will use to put in a document.
Doing the second, third and forth columns is easy enough (though I need to be able to match up the person who is pressing the button with the reviewer's name so that the tick goes in the right row), but because the "reviewers" field is variable in terms of the number of entries, I have no idea how to populate the first column, nor how to get the table itself to create the right number of rows to correspond with the number of entries in the reviewers field (I'd be happy to limit the table to 6 rows though if you need an upper limit - so I could pre-create the table with 6 rows if you can then tell me how to get each reviewer's name separated consecutively into each of the rows). Can you help? NB, I'm not Script literate, so if there's a formula solution I'd prefer it, but I suspect that if this can be done at all, it's going to require script, so please just be very clear about what I need to replace and where if you provide a script solution. Thanks very much! Maggie