Generic Value not availalble

When I create a variable I don’t have the option to set the variable type to ‘Generic Value’, its not in the drop-down list. I assume this is because I have ‘strict on’ so how do I turn it on/off ?

Hi @Terryg,

I think this is an issue with variable scope, You can try creating a new variable of type ‘Generic Value’ (Using Create Variable of type ‘Generic Value’). But, if you are looking to change an existing variable say of type String - You can change it using the drop-down present in variables pane ensure you are checking for the container with the right scope.

The drop down is just the main and recently-used variable types. You can try “Browse for types” at the bottom and search for “generic”, then look for the type you need. Looks like the full type is UiPath.Core.GenericValue

9 Likes

Thanks ClaytonM - That helps!

Terry Golding
Black Belt, Operational Excellence
AXA PPP Healthcare
Jubilee House,Vale Road, Tunbridge Wells
terry.golding@axa-ppp.co.ukmailto:terry.golding@axa-ppp.co.uk
Tel.01892 612169 / Int: 711 2169

I had the same issue as @Terryg (. If you look for generic in the ‘Browse for types’ there are 2 versions the ‘core’ and the ‘framework’.

You actually helped me with a problem with for each loops (break not working) as I was using the ‘framework’ version of the ‘for each’ which didn’t have break capability rather than the core version.

I’m not sure if there are any differences between the framework and core versions of GenericValue but in general should we always use the ‘core’ version if there are multiple versions of an activity?

Very good that you add this indication in the official tutorial

Browse for Types and search for Generic and then select UiPath.Core.GenericValue. It will show the full Name in the Variable type in Variable Pane instead of Generic Value only. I think its because we need to import **UiPath.Core Namespace.
For example, if you have the System.Data namespace imported, you can further use DataTable , DataView , DataColumn , DataRow and other classes that are available in it, without having to always type System.Data.DataTable and so on.

All imported namespaces are displayed in the Imports panel. Note that some namespaces are automatically imported when you browse for a .Net type variable or argument.

To open this panel, click Imports in the Designer panel.

Thanks for your help here!
This works fine for me.

1 Like

Cheers mate.

1 Like