cancel
Showing results for 
Search instead for 
Did you mean: 

IWorkflowScript for write/modify a KW value of Unity Form

Adonis_Corniel1
Confirmed Champ
Confirmed Champ

Hi, 

Is it possible to fill the value of a keyword of Unity Form through IWorkflowScript? 

I have seen examples of customAction with FormModifier and then apply the changes, but in IWorkflowScript it is not possible to use it.

2 ACCEPTED ANSWERS

Shane_Cook1
Star Contributor
Star Contributor

Adonis,

Maybe I'm missing some context of the question. The OnBase API allows programmatic access to keywords and form fields contained on a Unity Form.  For accessing the form instance, there is a full code example in the SDK documentation at the link below.

Working with Unity Forms: https://sdk.onbase.com/unitySDK/html/51a32e5c-83df-4fa9-8245-81395393672d.htm

Hope this helps,

Cheers.

 

View answer in original post

Alex_French
Elite Collaborator
Elite Collaborator

Hi Adonis,

It definitely is possible to work with Keywords or Form fields of a Unity Form in an IWorkflowScript.

If you want to work with Keywords, you would use a KeywordModifier object like any other document.
If you want to work with Form Fields, you would use a FormModifier object.

If you make changes in an IWorkflowScript and then want to us the value in Workflow immediately after, you'll want to check the box "Refresh item after script has executed" on the "Run Unity Script" Rule or Action.  If you don't do that, Workflow will be trying to work with "stale" data because it doesn't understand that your script made changes (in the way that Workflow knows if regular Workflow actions just made changes).

View answer in original post

2 REPLIES 2

Shane_Cook1
Star Contributor
Star Contributor

Adonis,

Maybe I'm missing some context of the question. The OnBase API allows programmatic access to keywords and form fields contained on a Unity Form.  For accessing the form instance, there is a full code example in the SDK documentation at the link below.

Working with Unity Forms: https://sdk.onbase.com/unitySDK/html/51a32e5c-83df-4fa9-8245-81395393672d.htm

Hope this helps,

Cheers.

 

Alex_French
Elite Collaborator
Elite Collaborator

Hi Adonis,

It definitely is possible to work with Keywords or Form fields of a Unity Form in an IWorkflowScript.

If you want to work with Keywords, you would use a KeywordModifier object like any other document.
If you want to work with Form Fields, you would use a FormModifier object.

If you make changes in an IWorkflowScript and then want to us the value in Workflow immediately after, you'll want to check the box "Refresh item after script has executed" on the "Run Unity Script" Rule or Action.  If you don't do that, Workflow will be trying to work with "stale" data because it doesn't understand that your script made changes (in the way that Workflow knows if regular Workflow actions just made changes).