Hey All,
I have a script that gets a document from a picklist collection. When I do this it limits the fields that are available to me programatically.
If I open the document in the UI, I have all of the fields.
Has anyone seen anything like this?
Thanks,
Shawn
Subject: Document from view does not contain all fields
Getting a document via a picklist returns you a handle to the backend copy of the document. So you will get all fields that have been saved in to the document.
When you open a document in the UI you also get ‘Computed for Display’ fields which are not saved in the backend but are only available in the front end. This is most likely what you are seeing.
Alex
Subject: RE: Document from view does not contain all fields
Hey Alex, thanks for the response.
There are three computed fields on the form. However there are no computed for display fields. All of the other fields are editable text.
Shawn
Subject: RE: Document from view does not contain all fields
There’s a couple of ways that could happen.
First, the form was updated at some time to add those computed fields, but the document in question was created before that happened. Thus, those items won’t exist in the backend document unless it’s opened in the (new) form and then saved.
Second, perhaps the document was created by an agent, and so have never been saved with the form. Thus the items have never been computed and saved.
Bear in mind that there’s a very loose connection between a document and the form. Form fields are not like traditional database fields, where when you add a field, all rows of the database are automatically updated. It’s very possible that document items always don’t match field forms.
Subject: RE: Document from view does not contain all fields
It is interesting to note that the documents that don’t appear to have the data available in the back-end doc collection were mailed in to the DB.
Shawn
Subject: RE: Document from view does not contain all fields
Even if the fields are computed when composed or computed, they are not really part of the document unless the document was saved through that form, if they were not already present when the original doc was mailed in.