Add New Item to a List Folder using List XML Variable
- Last UpdatedJun 25, 2024
- 2 minute read
A new item can be added to a list folder using list XML Variable. This can be done using Update Variable activity and List Navigator activity.
Follow the steps below to add a new item to a list folder.
-
Right-click the Start activity and select Activity Properties from the options.
-
Click the More button in the XMLVariables field.
-
Create a new variable of type XML List. Select the list to which a new item is to be added from the Select List drop-down. The XML variable scope should be set as New.
-
Drag and drop the List Navigator activity from the List Activities category. List Navigator activity is used to navigate to the folder to which the list item is to be added. You need to set the following properties:
-
XmlVariable of List Type - You need to select the XML variable created in the Start activity.
-
Folder Name - Select the folder name to which a new list item is to be added.
-
Scope - The scope should be set as New.
-
Enable Errors Encountered Output - It should be set as No.
-
You can set different paths for outputs - Action Completed and Folder Not Found. Folder Not Found is given by the activity when the folder is not found in the list.
-
Then drag and drop Update Variable activity. Click Set Variables button in the Set Variables field.
-
Click the Select link and then click the drop-down list that appears. Navigate to the Title field of the new variable and set its value. The value for the Title field will be the name of the new item.
-
Click OK to save the settings.
-
Publish the workflow. Execute the workflow to create a new item in the folder selected in the Folder Name property.