Moving items from one named bag to another #10046
-
Is it possible to move an item from one named bag to another from the admin menu? If not from the admin menu what about from code? For example, if you have a content type that has 2 named bag parts called "Section One" and "Section Two". Both take content items of the same type. I add an item to Section One, then later decide it should be in Section Two. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You will need to execute some SQL queries on your Document table to morph the JSON in the Content column. Search for SQL JSON Functions. The Named BagParts stores it's own data in the main content item JSON data. It basically allow to contain some more JSON data on a single content item (document). Moving data from one Named BagPart to the other should consist basically about changing the JSON Named BagPart name from "Section One" to "Section Two" of the JSON node. You can't actually do this from the Admin UI. From code it could be done with some migration. |
Beta Was this translation helpful? Give feedback.
You will need to execute some SQL queries on your Document table to morph the JSON in the Content column. Search for SQL JSON Functions. The Named BagParts stores it's own data in the main content item JSON data. It basically allow to contain some more JSON data on a single content item (document). Moving data from one Named BagPart to the other should consist basically about changing the JSON Named BagPart name from "Section One" to "Section Two" of the JSON node.
You can't actually do this from the Admin UI. From code it could be done with some migration.