2013-02-13 12:06 PM
I have created a basic workflow to create a volume and NFS export with several parameters. I have set up a few parameters that create the volume name based on user input and based on an already established volume naming convention. However, my final field in the volume name is a three digit, unique number based what is already in use on the chosen filer. How can I increment this number based on existing volumes?
Volume Name Convention: <Environment>_<Filer>_<Unique Number>
Existing filer1 Volumes: Prod_filer1_001, Prod_filer1_002, Test_filer1_001
The first two fields are filled in with variables selected by the user from drop downs. How can I compare what the user has selected and grab the next unique number?
Example: The user selects Prod and filer1 for the first two fields. The workflow sees that 'Prod_filer1_001' and 'Prod_filer1_002' already exist on filer1 and sets the new volume name as 'Prod_filer1_003'
It seems like a combination of a finder and function are needed, but I can't seem to put it together.
Solved! See The Solution
3 REPLIES 3
2013-02-13 01:27 PM
You're looking for the incremental naming wizard
As this is a very common task, WFA has a built-in feature for this. Move your mouse over the volume name input field and you'll see a button appearing on the right side of the field. Click on it to open the incremental naming wizard. Here you can select a filter or finder to find the last volume name that was already used. In your case, a filter based on a volume prefix should do the trick. The prefix is a combination of the user inputs such as: $environment + '_' + $filer
The simply tell WFA to increment by 1 (and what the name is when no existing volume is found, e.g. you are creating the first volume). Everything is automagically handled by WFA. Enjoy
Re: Create New Volume Based on Existing Volume Naming Convention
2015-11-05 02:47 AM
Further to this, is there a way to recurse this? As in, a user enter "volume0001", but volumes 0001-0005 already exist, and have WFA set the new volume name as 0006?