cancel
Showing results for 
Search instead for 
Did you mean: 

TryGetValue property array

Mark_Rogers4
Champ in-the-making
Champ in-the-making

 I am having trouble bringing in a property that contains multiple instances of a keyword.  The "Set property to all keyword value instances" checkbox is checked.  They keyword is defined as "Numeric (Up to 20 Digits)".

In my code I have this:

System.Int32[] expID2;

bool sourceFound = propertyBag.TryGetValue("propExposureID", out expID2);

I get this:

Task list execution failed: Unexpected error: Type is not the requested Type: System.Int32

I also tried using Int[], short[], and long[], but it still fails.

What am I doing wrong?

9 REPLIES 9

Tharon_Rivera
Star Collaborator
Star Collaborator

Awesome, Thanks Rob!

Daniel_Quill
Elite Collaborator
Elite Collaborator

Tharon,

I have some follow-up questions... What version of OnBase are you working with and what is the Workflow action that you are using that is setting this option?

Thanks,

Tharon_Rivera
Star Collaborator
Star Collaborator

Daniel,

I am currently using v14.0.0.45 of Studio.  I'm not the OP, so I haven't run into the same issue.  I haven't had any issues with retrieving properties by using string type from Unity scripts, but I typically use the Set Property Value (and type in a value) or Set Property to Expression workflow actions.  For retrieving keyword values, I usually just retrieve them from the Document keyword records.

Daniel_Quill
Elite Collaborator
Elite Collaborator

Tharon,

Thanks for the clarification.

Mark_Rogers4
Champ in-the-making
Champ in-the-making

Thanks for all the replies.  Using Decimal worked.  String did not.

Getting started

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.