Active IQ Unified Manager Discussions

Type "array" is not available in dictionary

THORSTEN_KRAUSE
5,603 Views

Hi,

 

wanted to create a dicitionary entry and saw that type "array" is missing in WFA 3.0.

Is there any particular reason for that or is it just a bug?

 

Greets Thorsten

1 ACCEPTED SOLUTION

shailaja
5,475 Views

For a simple case, you could look at the example in "cm_storage.Create Schedule" command.

 

It has parameters that are of [array] type

 

[parameter(Mandatory=$false, HelpMessage="Hours of the day when the schedule runs. This is a comma separated list of integers between 0 and 23 inclusive. Value of -1 means all hours of the day.")]
[ValidateRange(-1, 23)]
[array]$CronHours,

[parameter(Mandatory=$false, HelpMessage="Minutes within each hour when the schedule runs. This is a comma separated list of integers between 0 and 59 inclusive. Value of -1 means all minutes.")]
[ValidateRange(-1, 59)]
[array]$CronMinutes,

 

The Cmdlet used in the command code is of Array type

SYNTAX
Add-NcJobCronSchedule [-Name] <String> [-Month <Int64[]>] [-Day <Int64[]>] [
-DayOfWeek <Int64[]>] [-Hour <Int64[]>] [-Minute <Int64[]>] [-Controller <Nc
Controller[]>] [-ZapiRetryCount <Int32>] [<CommonParameters>

 

The dictionary entry properties for these parameters are of String type

 

schedule_de.png

 

 

So, basically an Array type in command parameter can map to String type in dictionary entry.

 

Would this work for your command and dictionary entry design ?

 

Thanks,

Shailaja

View solution in original post

6 REPLIES 6

shailaja
5,590 Views

Hi,

 

Can you please clarify the following:

 

Are you referring to data type of a dictionary entry attribute to support Array or is it in some other place ?

If you could provide more details on the dictionary entry design that you are designing, we could understand better.

 

Thanks,

Shailaja

THORSTEN_KRAUSE
5,584 Views

Hi,

 

I'm referrig to a dictionary entry.

Edit entry --> Add row --> Type field

 

Reason is that I want to create a template on top of it for a specific command I wrote.

 

Does that make it more clear?

 

Thanks, Thorsten

sinhaa
5,545 Views

 Rows in disctionary( DB table) are equivalent to columns in the Table. WFA DB is mysql and mysql doesn't support array data type.

 

See some comments here: http://dev.mysql.com/doc/refman/5.1/en/data-type-overview.html

 

I like the second comment of using a JSON string. I believe XML as string will do just that. I haven't tried either solutions but going to now.

 

sinhaa 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

THORSTEN_KRAUSE
5,492 Views

ok, so what would you recommend in this case?

 

- I got a powershell-command using type array in one parameter

- I'd like a dictionary entry for that command's parameters in order to create some templates

 

Thanks!

shailaja
5,476 Views

For a simple case, you could look at the example in "cm_storage.Create Schedule" command.

 

It has parameters that are of [array] type

 

[parameter(Mandatory=$false, HelpMessage="Hours of the day when the schedule runs. This is a comma separated list of integers between 0 and 23 inclusive. Value of -1 means all hours of the day.")]
[ValidateRange(-1, 23)]
[array]$CronHours,

[parameter(Mandatory=$false, HelpMessage="Minutes within each hour when the schedule runs. This is a comma separated list of integers between 0 and 59 inclusive. Value of -1 means all minutes.")]
[ValidateRange(-1, 59)]
[array]$CronMinutes,

 

The Cmdlet used in the command code is of Array type

SYNTAX
Add-NcJobCronSchedule [-Name] <String> [-Month <Int64[]>] [-Day <Int64[]>] [
-DayOfWeek <Int64[]>] [-Hour <Int64[]>] [-Minute <Int64[]>] [-Controller <Nc
Controller[]>] [-ZapiRetryCount <Int32>] [<CommonParameters>

 

The dictionary entry properties for these parameters are of String type

 

schedule_de.png

 

 

So, basically an Array type in command parameter can map to String type in dictionary entry.

 

Would this work for your command and dictionary entry design ?

 

Thanks,

Shailaja

THORSTEN_KRAUSE
5,430 Views

Hi,

 

yeah that's what I'm already doing, just thought it's looking not very consistent.

But your answer make it more clear to me.

 

Thanks

Thorsten

Public