I have vendor scanned documents that have fields in a template and fields that are not in a template. I'm moving the documents to a folder and populating a standard template using a business process workflow. The original template fields go away when i assign the new template, but not the non-template fields. There has got to be a way to do this, right?
Discussion
Discussion
How to delete a non-template field from a document in workflow
posted on October 25, 2024
•
Show version history
0
0
replied on October 29, 2024
Found more information on this issue in Answers, which also contains a more complete coding of the process from Bert Warren.
1
0
replied on October 28, 2024
OK folks. I just created a script to do it. I have not used it against a field in a template and would strongly recommend that you never do that. It does work fine for non-template fields.
Namespace WorkflowActivity.Scripting.SDKScriptRemoveField '''<summary> '''Provides one or more methods that can be run when the workflow scripting activity is performed. '''</summary> Public Class UTL_RemoveField Inherits RAScriptClass110 '''<summary> '''This method is run when the activity is performed. '''</summary> Protected Overrides Sub Execute() 'Write your code here. The BoundEntryInfo property will access the entry, RASession will get the Repository Access session Dim inFieldName As String = GetTokenValue("inFieldName") Dim BoundFieldValues As FieldValueCollection = BoundEntryinfo.GetFieldValues() BoundFieldValues.Remove(inFieldName) BoundEntryInfo.SetFieldValues(BoundFieldValues) BoundEntryInfo.Save() End Sub End Class End Namespace
1
0
replied on October 28, 2024
Why are they using fields that are not assigned to a template?
0
1
replied on October 25, 2024
If you do this using Workflow, there is a checkbox in the Assign Field Values activity to remove fields from unassigned templates.
0
0
You are not allowed to follow up in this post.