We have a fixed table with multiple columns that we use to populate frequently used records.Is there a way to add records (multiple fields) to a fixed table using script, so we can add them "live" rather than in Author?
This is a great question and one of the most common confusions that I see with the new table component types. Fixed tables are fixed and are unable to be edited in the interview. Fixed tables are best for things, such as lists of States, Countries, or other options that change less frequently.
What you are seeking is actually a Table Variable.
Create a Table Variable
Add the columns you need specifying each column data type.
Select a Key Column (Remember that a key column forces the data found in that column to be unique)
Write the populator.
Table variable populators use the same scripting instructions as old MC Variables, however the format differs slightly because they are a new component. Here is some pseudo code:
CLEAR TableVariable
// This adds a single row of data to your table variable
ADD {Column1: "Value", Column2: "Value" } TO TableVariable
// You can also spread out the syntax to make the code easier to read. This is helpful if you have 5 or more columns in a table.
ADD {
Column1: "Value",
Column2: "Value"
} TO TableVariable
// This code has added 2 rows of data to a table variable where Column1 and Column2 are text data type.
When you have a table variable with a Key Column setup you can assign that table variable as an option source to a Single Select, Multi-Select, or Text with Answer Suggestions component. When you do this, the key column will represent the data of the selected value. On the Display tab of SS & MS variables you can set your Option Labels to represent any of the columns in your table variable.
This is a great question and one of the most common confusions that I see with the new table component types. Fixed tables are fixed and are unable to be edited in the interview. Fixed tables are best for things, such as lists of States, Countries, or other options that change less frequently.
What you are seeking is actually a Table Variable.
Create a Table Variable
Add the columns you need specifying each column data type.
Select a Key Column (Remember that a key column forces the data found in that column to be unique)
Write the populator.
Table variable populators use the same scripting instructions as old MC Variables, however the format differs slightly because they are a new component. Here is some pseudo code:
CLEAR TableVariable // This adds a single row of data to your table variable ADD {Column1: "Value", Column2: "Value" } TO TableVariable // You can also spread out the syntax to make the code easier to read. This is helpful if you have 5 or more columns in a table. ADD { Column1: "Value", Column2: "Value" } TO TableVariable // This code has added 2 rows of data to a table variable where Column1 and Column2 are text data type.
When you have a table variable with a Key Column setup you can assign that table variable as an option source to a Single Select, Multi-Select, or Text with Answer Suggestions component. When you do this, the key column will represent the data of the selected value. On the Display tab of SS & MS variables you can set your Option Labels to represent any of the columns in your table variable.
Hope this helps.
Additional Resources:
https://help.hotdocs.com/author/current/Table_Variable_Overview.htm
https://help.hotdocs.com/author/current/Option_Sources_Overview.htm