Effective December 3, NetApp adopts Microsoft’s Business-to-Customer (B2C) identity management to simplify and provide secure access to NetApp resources.
For accounts that did not pre-register (prior to Dec 3), access to your NetApp data may take up to 1 hour as your legacy NSS ID is synchronized to the new B2C identity.
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

One or more values in a field

olson

So I am building a workflow to build one or more volume using a repeat loop. This works fine however, I would like to be able to provide a single volume size or multiple volume sizes comma separated.

Can someone help me with a java if statement I can use to accomplish this?

my volume name is extracted from the share name  field

splitByDelimiter($ShareName,",",ShareIndex1-1)

this works but expects a one to one

actualVolumeSize(splitByDelimiter($VolumeSize,",",ShareIndex1-1) * 1024, volume4.snapshot_reserved_percent)

what I want is a if clause

(getSize($Volumesize)  == 1?$Volumesize:splitByDelimiter($VolumeSize,",",ShareIndex1-1)

this is not working.

Ideally I would like to account for a incorrect number of values as well.

Thanks In advance

John

2 REPLIES 2

sinhaa

John

What error are you getting? Is it possible to share your workflow?

Expressions for size:

getSize($volSize) == 1?$volSize: (splitByDelimiter ($volSize,",",Index1-1)

work fine if at execution the $volSize is provided as: "10240"

or for multiple values: "10240, 2048, 4096"

i.e. Inputs at execution to be provided with double quotes.

@Ideally I would like to account for a incorrect number of values as well.

-----

Its fine if you provide number of values > Num. of looping cycles. If less then this passes in planning ( bug?), but execution will fail as mandatory parameter size_mb for one of the cycles will become empty.

sinhaa

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

sinhaa

actualVolumeSize(splitByDelimiter($VolumeSize,",",ShareIndex1-1) * 1024, volume4.snapshot_reserved_percent)

The problem is passing parameter of volume definition object in a function call as arguments. Though WFA GUI auto-complete will show this as correct, this is an incorrect MVEL expression.

Use it like:

actualVolumeSize(splitByDelimiter($VolumeSize,",",ShareIndex1-1) * 1024, volume4["snapshot_reserved_percent"])

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
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