Skip to content

chettinger/PCFTagPicker

Repository files navigation

PCFTagPicker

This project utilizes the Fluent UI TagPicker control to render Connections to an entity record as tags.

Requirements

  • A tag category entity (ex. my_tagcategory)
    • A Single Line of Text for the category name (ex. my_name)
  • A tag entity (ex. my_tag)
    • A Single Line of Text for the tag name (ex. my_name)
  • A lookup to the category entity
  • Connections enabled for the tag entity and the entity to be tagged
  • Connection Role added with Tag entity as record type. Recommended:
    • Step 1: Name = Tag Connections
    • Step 2: Only these record types = Tag

Control Configuration

The control can be used for Single Line of Text or Multiple Lines of Text field types. Even though the control manages connections between entities, it also stores a comma-delimited string in the field for display purposes. Warning: Keep this in mind when choosing a field type. For example, if many tags are added to a record and a Single Line of Text field is used with a limit of 200 characters; you could encounter an error. It is recommended to use a Multiple Lines of Text field type.

The control requires several items to be configured:

  • TagsField: The Field the control is bound to (ex. my_tags)
  • TagsEntity: The name of the Tag entity (ex. my_tag)
  • TagsEntityDisplayNameField: The Tag field to display in the control (ex. my_name)
  • TagsEntityCategoryField: The field of the tag entity that references the category (ex. my_category)
  • ConnectionRoleName: The name of the Role used for tags connection (ex. Tags). NOTE: Connections must be enabled on entities and Role created.
  • CategoryEntity: The name of the Category entity (ex. my_tagcategory)
  • CategoryEntityNameField: The Category name field (ex. my_name)
  • CategoriesField (optional): The Categories to filter (comma-delimited) (ex. Default, Category 1,Category 2). If nothing in provided, then all tags will be returned. Otherwise, enter the category names to filter.

Searching

In order to search for entity records that have connected tags, do the following:

Using Connections

This approach uses the actual tags to filter results

  1. Open Advanced Search
  2. Select the entity with connected tags
  3. Select Connection (Connected From)
  4. Select Connected To for field
  5. Select Equals for operator
  6. Using the lookup tool:
    • Look for: Select Tag entity
    • Select the tags for your criteria and then click Add
  7. Configure columns and any additional criteria and then click Results

Using String

This approach uses the comma-delimited string stored on the record to filter results

  1. Open Advanced Search
  2. Select the entity with connected tags
  3. Select Tags for field
  4. Select Contains for operator
  5. Enter the text of the tag you are looking for
  6. Repeat previous 3 steps with grouping if desired to refine search criteria
  7. Configure columns and any additional criteria and then click Results

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published