Adding a computed field to a form does not populate existing documents with that field. You can create an agent to refresh all documents which basically saves / recomputes each document, in order to populate the newly created computed fields.
What Robert told you is exactly correct. Please follow his advice.
You can see the field value when you open the document in read mode, because when you open the document Notes computes the formulas for fields that are missing from the document. However, unless you save the document, these newly computed values will not be stored in the document and are not available from the view.
There’s 2 possibilites I can think of based on the info you’ve provided:
In your agent that is building these documents you are not filling in the contents of the field used by this view. You may be trying “ComputeWithForm” in an attempt to populate this field but that method wasn’t intended to force all fields to compute.
You’re getting a value into the field when the agent creates the document but the summary property of the field is somehow not getting set to True.
You’ve said that the field data is available when you look at the form (by which I take it you mean the document in question). Are you looking at the document properties to see the contents of your field? If so, how are you viewing the properties? Are you opening the document into the ui and then viewing document properties, or are you pulling up the document properties from a view.
If you have the document open and viewing the properties it doesn’t mean that the data is actually saved into the backend document. The field is acting as a computed for display field in that case.
If you’ve seen the field properties from the view and the data is really stored in the document, double check to see if the properties of the field say “Field Flags: SUMMARY”. That summary flag is an internal flag that allows fiels to display in a view. (I’m sure it has other uses as well).
As a previous poster stated you can write a simple agent which would correct the problem you’re seeing. @Command([ToolsRefreshSelectedDocs]) will do the trick. You’ll still probably want to figure out the underlying cause though.