Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Using tags in entities

Posted on by 477

Greetings,

Since this is not supported yet, I am trying to implement a tag system myself (for different entities, cutom and not).

I first looked for plugins doing it, but they are north of the 1000$.

So, I added a tag entity, and I am adding N:N relationships to tags, in the entities I want to add tags too. I then add a subgrid in those forms, which allow me to easily add tags.

I can even use the advanced search, with related items, to search based on tags.

The issue is, the main reason I need tags, is for reporting. And, that seem to be impossible, as I cannot add those tags in views.

Any work around? Any other suggestions?

Cheers

  • Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: Using tags in entities

    totally forgot that a multiple option set can be useful in your scenario, good finding

  • Suggested answer
    Hedi Daneels Profile Picture
    Hedi Daneels 477 on at
    RE: Using tags in entities

    After starting to develop my own PCF, I found out that you can simply do a multiple choice option set. It works wonders in my case, as we do not want dynamics tags.

    So, if enyone else is finding this:

    - make an option set

    - use a multiple choices set

    This will allow you to easily add and remove tags from a record. And in views, you will be able to see all the tags in the specified field.

  • Hedi Daneels Profile Picture
    Hedi Daneels 477 on at
    RE: Using tags in entities

    The problem is, from the first scope definition I got, the user needs to be able to make "reports" in marketing, export them to excel to continue playing with the data, make PIVOTs etc.

    Ill check with the customer first before deciding how to proceed.

  • Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: Using tags in entities

    just a note as you mentioned "plugins" in your question.

    It is possible with plugins to "keep in sync" the content of related records with a single text field (that you can use in reporting) so your users can still use the standard grids to do data entry and you can show the content of this single text field in views and report. pricing may vary based on the developer.

    If the report needs to be generated like once a month, instead of a plugin it's possible also to create a console application that will go trough the related records and update this text field (basically the same logic of the plugin but executed on demand), you don't have real time but you can have a status before the report is generated.

  • Hedi Daneels Profile Picture
    Hedi Daneels 477 on at
    RE: Using tags in entities

    Thanks for your elaborate reply Guido. It sure helps me understand better what you meant.

    I will have to get back to my customer and try to refine his request, it seems there is indeed no "clean" solution.

    Thank you.

  • Verified answer
    Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: Using tags in entities

    well, you wrote "I cannot add those tags in views." I assumed you were talking about Dynamics 365 standard views and with that is normal to don't be able to "aggregate" related records (as the tags in your situation) inside the main record that is shown.

    It's not a visual aspect problem, is how you decide to store the information. Of course creating an entity and add an N:N relationship is from a data aspect (or db normalization if you prefer) the best thing you can do.

    Beside how the data is internally stored, you have two problems:

    1) how normal users are able to create/update/delete these tags, if you use a N:N relationship you have the standard grids, and if you use a different system you have PCF, is not only an UI/UX problem, is a data entry problem you are facing.

    2) how the reporting is done, standard views I already replied above, if you do a report (with the classic report engine or with Power BI) you will have more complexity when you have an additional entity but is doable, different if you have a text field that hold the value (in the format you wish or with a simply transformation you can apply), 99% you use the report to visualize the data (not talking here about inline editing you can achieve with Power BI)

    the downside you can face if you store the values in a single field is how you search for records with only a specific value, but lucky for us the advanced find filtering is good enough to solve our problems.

    for example you have two records with the following tags

    "A", "B", "D"

    and

    "B", "C", "E"

    and you want the records containing "B", because the field is text you can use the Contains clause.

    Problem, what if we have values like

    Alpha, AlphaChannel, Beta

    and when we search for Alpha (Contains) we don't want AlphaChannel to be returned?

    that can be solved (not completely but is a start) by storing (note: storing, visualization can be transformed) like

    "Alpha", "AlphaChannel", "Beta"

    and the filter needs to contains the quotation marks

    of course this only if you are aware that this kind of tags can happen in your configuration.

    No solution is 100% perfect otherwise everybody would use that.

    hope it helps

  • Hedi Daneels Profile Picture
    Hedi Daneels 477 on at
    RE: Using tags in entities

    Thanks for your reply.

    The visual aspect is the least of my worries, as the tags will be driven by the api's which create the records.

    I do not understand how you want to do reporting based on a single tag field with comma separated tags? Can you explain please?

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: Using tags in entities

    if you need the tags for reporting, the easiest way is to store the values inside a text field.

    There are some pcf controls using this system, like this one

    pcf.gallery/.../

    if you need to modify the tags that users are allowed to edit, maybe you need to modify the code, but it can be a good start

    hope it helps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans