I am getting an error when I enter a computation to a single select column. The SS options has a second column named Desc. A computation variable is set for the second column, which calculates the petitioner's full name as a text result type. I'm getting the following error: "
InterviewEngineError: Failed to process the Interview() for the template 'DV Petition for Divorce.docx'. (this.P_0020Full_0020Name_Script is not a function)
TypeError: this.P_0020Full_0020Name_Script is not a function at Object.Desc (http://localhost:60311/ipi/session/ba20839a-127f-4b94-a209-e2d805ff22ef/idefs?templateName=%2FDV%20Petition%20for%20Divorce.docx.js:1:76252) at t.GetIndexedCellValue (http://localhost:60311/hd/scripts/hdmain.js:7:128523) at f.GetRecordValues (http://localhost:60311/hd/scripts/hdmain.js:7:793555) at i.GetRecordValues (http://localhost:60311/hd/scripts/hdmain.js:7:838456) at Object.i [as GRV] (http://localhost:60311/hd/scripts/jquery-3.3.1.min.js?vers=3.3.1:2:86266) at Object.Debt_0020Responsible_0020Party_DisplayColumn (http://localhost:60311/ipi/session/ba20839a-127f-4b94-a209-e2d805ff22ef/idefs?templateName=%2FDV%20Petition%20for%20Divorce.docx.js:1:13558) at t.GetOptionLabel (http://localhost:60311/hd/scripts/hdmain.js:7:130612) at Object.<anonymous> (http://localhost:60311/hd/scripts/hdmain.js:7:132417) at t.toString (http://localhost:60311/hd/scripts/hdmain.js:7:105459) at e.EvaluatePromptImmed (http://localhost:60311/hd/scripts/hdmain.js:7:114569)
Based on the error message, I can see that the error is triggered by the computation in the second column, but I'm not sure how to resolve the error. I've tried both with and without VALUE in the full name computation.
Any help is appreciated.
In HD Author, as a rule, I believe you are not supposed to add dynamic fields to the Key Column, and this was likely the issue you encountered. The system should allow you to add computations and fields to columns that aren't your Key column. This is one of the ways we do MC Other Options with modern SS variables.
Just for clarification, when you say you are adding a computation to column, do you mean you are using a computation to set the result of variable in a column? Or are you actually trying to add an actual computation to a column? If it's the latter, I do not believe that is supported by HotDocs. A computation results in either a boolean (true/false), a string, or a number. You should use a computation to set the result of a column, not actually be the result of a column.
For example, if you have a list of clients and you are trying to set the prefix to be either "Mr." Or "Ms." depending on whether that person is male or female you could do something like this:
CLEAR table1
IF mcMale-Female = "Male"
SET mcMr-Ms TO "Mr."
ELSE IF mcMale-Female = "Female"
SET mcMr-Ms TO "Ms"
END IF
ADD {
teName.ContactName,
mcMale-Female.Gender,
mcMr-Ms.Prefix
}
TO table1
If you don't want to clutter your library with variables that are only used in a computation, such as the [mcMr-Ms] variable above, you can just create a local variable. 😁👍
Hope that helps!