0
votes

There is a Multivalued field 'lines' (dataype Text List). Then there is another field 'para' which is of the type Text and is a computed field. The field 'para' has the formula @Implode(lines;@NewLine). Using Lotus Notes client, when I add multiple text entries for the field 'lines' , I see that the computed field 'para' correctly contains the concatenation of all the text entries in 'line' field, due to @Implode. All ok uptill now.

But when I access the 'para' field programmatically I am seeing the problem as follows:

Dim document As NotesDocument

Dim paraValue As String

'assume the code to set document variable has been done.

'So basically the paraValue below does not contain concatenation of all the strings in 'lines' field.

paraValue=document.para(0).

When I inspect the variable values(during Debug mode), I see that the the field 'lines' contains all the array entries for the text lines I had input. But the computed field 'para' does not contain all the entries after concatenation from the 'lines' field. So I am getting incomplete data in the 'para' computed field. Any idea why all the entries in 'lines' field are not fetched in the 'para' field?.

Please note*

1-For the 'lines' field the option 'separate values when user enters' has the value NewLine. The 'lines' field has been ticked for 'Allow Multiple values'.

2-When I want to add new entry for field 'lines' I press at the last entry and add a new entry and then click on Save. In short each Text entry in 'lines' has been separated by a newline.

Thanks in advance.

1

1 Answers

1
votes

You haven't specified what type of script this is, so it's hard to say for sure, but it sounds like your script is being invoked in an event handler after the field 'lines' has been updated, but before the field 'para' has been recomputed. In general, computed field formulas execute when a document is loaded, saved, or if a refresh is triggered. A refresh can be triggered every time you change a field value if you set the Form property 'Automatically refresh fields', but this is not recommended for anything other than trivial forms due to the performance impact. A refresh can also be triggered by code in your script, like this:

document.ComputeWithForm(false)