Use Case 1: Random value selection from a variable
Ability to create multiple documents, store all the document numbers, and select one random document number to be used in the next business process step.
Example
You want to create multiple quotation documents (QT) using transaction code VA21, and view a randomly selected QT number in transaction code VA23.
Procedure
Step 1: Record a flow with the following steps:
Task 1:
Go to the transaction /nva21;
Create quotation and use Store function to store the QT number;
Task 2:
Go to the transaction /nva23 and type the QT number in the input field.
Step 2: Create a variable:
Open the Store step (last step in Task 1) and turn-on “Export Data as Variable” switch;
Type and save the variable name (i.e. P_QTNUMBER);
Step 3: Duplicate the Data set
Go to the Data set and create a new Data set by duplicating the Default one:
Step 4: Configure Loops in the Data set
Export the Data set into excel and add as many Loops !only for Task 1! as many QT you want to create;
Save the excel file and import the Data set back to Qualibrate.
Step 5: Configure the Function in the Data set
Open an Advanced configuration window for Type step in Task 2 in this new Data set;
Go to the Advanced tab and type the following function:
(function () { var x = ${P_QTNUMBER}; return x[Random(3)]; })();
Where:
${P_QTNUMBER} is your variable name
(3) equals the number of iterations/loops you will have to create QT (starts from 0).
Click Save and run your flow. Don’t forget to select the right Data set in Run window:
You can also use the same approach within a scenario, creating 2 Flows instead of 2 Tasks. In this case, you need to use both flows in the context of a scenario.
Use Case 2: Random value selection from a given list of values
Ability to provide a list of values and select one random number to be used in the next business process step.
Example
Provide a list of already existing quotations (QT) and select a random one to view it in a transaction code VA23.
Procedure
Step 1: Create a Flow and add a Manual step to set the list of values
Create a Flow
Create Task 1 manually
Insert a step to the new Task
Step 2: Configure the manual step
Type the name and click Save or hit Enter;
Select the Action Type “Export Dataset Value”;
Turn-on “Export Data as Variable” switch;
Type and save the variable name.
Step 3: Record Task 2 including the following steps:
Go to the transaction /nva23;
Type the value in the input field and press Enter.
Step 4: Duplicate the Data set
Go to the Data set and create a new Data set by duplicating the Default one
Step 4: Configure Loops in the Data set
Export the Data set into excel and add as many Loops !only for the manual step in Task 1! as many numbers you want to have in the list for selection;
Fill in the values for all the loops;
Save the excel file and import the Data set back to Qualibrate.
Step 5: Configure the Function in the Data set
Open the Advanced configuration window for Type step in Task 2 in this new Data set;
Go to the Advanced tab and type the following function
(function () { var x = ${P_QTNUMBER}; return x[Random(3)]; })();
Where:
${P_QTNUMBER} is your variable name
(3) equals the number of iterations/loops you will have in Task 1 (starts from 0).
Click Save and run your flow. Don’t forget to select the right Data set in the Run window:
You can also use the same approach within a scenario. Instead of having two Tasks within one Flow you can create two different Flows. In this case, you need to use both flows in the context of a scenario.
Comments
0 comments
Please sign in to leave a comment.