1

I have a categories' hierarchy in my system that needs to be changed when the parent item's value has changed.

When a create a new category in my system, I always save the path of hierarchy. For example: I've created a category called Category 1, after that I will create a category called Category 1.1 that is Category 1's child.

The path of hierarchy would be: Category 1 > Category 1.1

I would like to call a event receiver, to update all categories children. Is that possible?

For example:

Category 1 (Path: Category 1)
    Category 1.1 (Path: Category 1 > Category 1.1)
        Category 1.1.1 (Path: Category 1 > Category 1.1 > Category 1.1.1)

When I updated the name of Category, all paths need to be changed. If I change the name from Category 1 to Category X, all paths need to be changed.

2
  • Have you looked at using Managed Metadata for this? When you create terms, they can be in a hierarchy and can be displayed like that, and if you move terms in the hierarchy, the lists automatically reflect it.
    – mannaggia
    Commented Jan 16, 2018 at 11:19
  • Managed Metadata sounds like the place for this type of hierarchy, but updating child items as described cannot be done with workflows or Microsoft Flow as there are no events that can be bound to Managed Metadata terms. I would implement custom tool that displays the MM hierarchy, and allows renaming + takes care of updating the child items.
    – Jussi Palo
    Commented Jan 16, 2018 at 11:52

1 Answer 1

1

Sounds like a custom workflow would achieve this for you. If you were using SP 2010 or 2013 I would say download Sharepoint Designer, but since you are using SP Online I am not sure what your options are. Someone else will be able to advise.

A custom workflow could be set to trigger on an item being modified. You can make statements like IF Current Item:Category is changed, SET PathCategory field to 'xxx'.

You'll need to look up some examples of workflows to copy from. Try browsing the [Workflow] tag in this site.

2
  • Thanks for your answer. Unfortunatelly, I can't use workflow. Do you know if there is an option instead Workflow? Commented Jan 16, 2018 at 10:45
  • Hi Guilherme, I have no experience of SP Online, so I'm not sure what your options are. I understand that MS Flow is used instead of SP Designer, but I have no experience of that either. I suggest doing a search on "SP Online workflow alternatives". Actually I just found a useful post: link
    – Tally
    Commented Jan 16, 2018 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.