07-07-2014 09:06 PM
Hello,
I have written a script that loops through repeater fields and outputs the repeater values to a list of values in a Word document. However, if a user adds a blank repeater line, my script errors with the exception:
Value was not set.
System.InvalidOperationException: Value was not set.
at Hyland.Unity.UnityForm.Field.get_Value()
The exception occurs at the "for each" line:
For each field as Hyland.Unity.UnityForm.Field in repeaterItem.Fields
'write the fields to a pipe separated string
Next
The problem I'm having is that I don't know how to check to see if values are empty prior to looping through the fields. I've tried using the field.isEmpty property after the "For Each", but the error occurs prior to that check.
How do I check to see if a value has been set in a repeater field prior to looping through? I could not get a check at the "repeaterItem" level to work either.
Thanks
07-09-2014 08:43 AM
07-09-2014 12:11 PM
Thanks for the response Patrick. I will not have the opportunity to get API certified until later this year, but I will ask the question via one of our other certified people.
Is the expectation that the repeater iterations handle blank entries without a check, or do I need to make some kind of check before looping through each value?
07-11-2014 09:20 AM
07-14-2014 11:33 AM
got it, thank you. I will validate through API support.
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.