Question

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.

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top