Tag an Entity via FlowLast Updated: 12/06/2018 Introduced in Version: 2.0
A “tag,” a short, easily remembered name, can be assigned to entities such as documents, reports, forms, and flows. Users can enter tags when searching for an entity. Assigning the same tags to similar entities allows them to appear together in search results, and to be grouped together on reports. The Tags filter feature in a Designer Projects folder is a helpful way to quickly find entities with a certain tag.
A tag can be added manually or can be added using a flow. When creating a flow to add a tag to an entity, you must know the ID of the entity to add the tag to, and the object’s full type from the platform framework.
To add a tag to an entity using a flow, in the Flow Designer, drag an Add Tag component to the work space.
This example will:
- Create a flow that adds a tag to a document.
- Run the flow.
- View the document to see that the tag has been added.
From the Flow Designer start-up window, we want to find Fetch by ID step to pass the document that we want to tag to the Add Tag step later. In this particular case, we can tag an entity that exists in user defined type data folder. Here is the path for an existing Entity folder called Vehicle Passenger. In User Defined Types > Entities> VehiclePassenger , select a Fetch By ID component and click Add to add it to the workspace.
Change the mapping type of the first input, objectID, to FetchByID_Output.ID.
We enter the object’s full type in the platform’s framework in the objectType Value field.
We enter a short name for the object type in the objectShortType Value field.
Finally, we set tag as constant and enter the tag that will be added to the document when the flow runs in the tag Value field as ‘Tagged Through Flow“.
This completes our mapping, so we click OK to save the changes and close the Mapping Editor.
Our flow is also complete, so we save the flow and run it in the Debugger.
Click Debug Flow to access the Debugger.
To see the flow’s execution, we click the Diagram tab. The flow completes with no errors. A tag is added to the document designated in the Mapping Editor.
To view the document’s tag, we close the Flow Designer and navigate to the folder containing the document. We select it and select Add> Setup> Manage Tags in the lower right.
The tag has been added to the document.