10-05-2012 11:56 AM
Hi team,
I created a form that contains a Unity multiline text field.
This field is named "txtMensagem" and is not associated with any keyword
This form is in a workflow where through unity script, I need to retrieve the value of this field.
I am using the following commands:
// Carrega as informações do documento
Document objDoc = args.Document ;
if ( objDoc == null )
{
throw new Exception("eMail Resposta não encontrado.");
}
else
{
app.Diagnostics.Write( string.Format("eMail Resposta id=<{0}>" , objDoc.ID.ToString() ) );
}
// Texto do eMail
Hyland.Unity.UnityForm.Form objForm = objDoc.DefaultRenditionOfLatestRevision.UnityForm;
app.Diagnostics.Write("objForm com sucesso");
// Accessing Unity Form fields and repeaters
Hyland.Unity.UnityForm.FieldList objFormFields = objForm.Fields;
app.Diagnostics.Write(string.Format( "formFields com sucesso=<{0}>" , objFormFields.Count.ToString() ) );
foreach ( Hyland.Unity.UnityForm.Field objField in objFormFields )
{
app.Diagnostics.Write( string.Format ("Field <{0}> = <{1}>", objField.ToString() , objField.Value.ToString() ) ) ;
}
The problem is that the object objFormFields with this property with objFormFields.Count = 0
10-12-2012 10:11 AM
In this case, the field should be available in your fields list. Do you have any other configurations on the field or form that may be securing this field or making it not part of the form? Does this happen with all of your documents of this type, even new ones?
10-29-2012 05:37 AM
Hello Alicia,
After some testing, I noticed that when creating a field of type text (field) form the unity without being tied to a keyword, the interface suggests a name for himself as an example: fieldtext9.
I was changing its name to a name more suggestive, in my case txtMensagem.
For some reason, the interface was not saving eForm that I changed the name, and for this reason could not find the field.
As I used the original name "fieldtext9", the application started to work.
Thanks for your suggestions
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.