The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

[array] input parameters

francoisbnc

I would like to use [array] type in commands, Is someone can explain how user inputs must be formatted for retrieve  string list in a foreach loop

Tried with   '@("table1","table2", "table3")'  without success.

francois

1 ACCEPTED SOLUTION

sharu

Hi

You will need to mention the array elements without the @ symbol. So in your case, put AA,BB as input instead of '@("AA","BB")'

-Sharu

View solution in original post

4 REPLIES 4

sharu

Hi Francois

Not sure if this is what you are looking for:

Please try using it like the below:

param (

  [parameter(Mandatory=$true, HelpMessage="abcd")]

  [array]$abcd

)

$arrayelemnet= $abcd[1]

-Sharu

francoisbnc

Hi Sharu,

How is the syntax to pass [array]abcd parameter from Workflow user Inputs?

In my example:

param (

   [parameter(Mandatory=$true, HelpMessage="One or more license codes of a Data ONTAP service to be enabled.")]

  [array]$Codes

)

foreach ($Code in $Codes)

{

Get-WFALogger -Info -message $($Code)

}

sharu

Hi

You will need to mention the array elements without the @ symbol. So in your case, put AA,BB as input instead of '@("AA","BB")'

-Sharu

View solution in original post

francoisbnc

Damn it seemed i tested this possibilty, that works but I have to remove parenthesis

Thank you

francois

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public