cancel
Showing results for 
Search instead for 
Did you mean: 

Unity Form Custom Action to execute a unity script

Sherri_Henderso
Star Contributor
Star Contributor

I have a unity form (OnBase 15) that has a repeater section in it.    As part of that repeater section I have included a condition button.  The repeater section contains 4 fields and the condition button per row.  I want to execute a unity script from the condition button.  Doesn't seem to difficult, my problem is that I want to pull the value from field 1 of the repeater section row, that the button is on.

Are there any sample scripts that would show how to execute this?

1 ACCEPTED ANSWER

Lois_Nowak
Confirmed Champ
Confirmed Champ

You can search for a specific field in ValueFields:  args.FormInstance.ActiveRepeaterItem.AllFields.ValueFields

View answer in original post

3 REPLIES 3

Lois_Nowak
Confirmed Champ
Confirmed Champ

args.FormInstance.ActiveRepeaterItem will contain the row that contains the condition button that triggered the custom action to run the script.

From this ActiveRepeaterItem, you can create an EditableRepeaterItem where you can make any field updates.

Add your EditableRepeaterItem to a FormModifier before calling ApplyChanges.

I hope this helps!

Once I have the args.FormInstance.ActiveRepeaterItem how to I gat the value for field 1 in the repeater? Keep in mind I don't need to make any field updates, I just need to get the value of the 1st field.

Lois_Nowak
Confirmed Champ
Confirmed Champ

You can search for a specific field in ValueFields:  args.FormInstance.ActiveRepeaterItem.AllFields.ValueFields