Hello, I create pages using a BluePrint that saves one or more labels and metadata when saving. In the page view, the macro: "Page properties report" the pages are displayed in a table with the metadata/labels as columns.
1st Problem sorting:
If the page contains more than one value as metadata, the sorting for one category does not work . I want to sort by individual values and not by groups of values.
How can I solve or work around this problem?

2nd Problem Keywords refer to other spaces:
If the page contains multiple metadata and labels, I can't sort by a single labels, but I can click on it and see similar pages. However, this is impractical if pages from other spaces are suggested. Confluence does not seem to make a distinction here. I only want pages from the "current space" to be displayed for the label.
How can I solve or work around this problem?
The idea is to provide content with metadata or labels so that it can be assigned to other pages beyond the tree view structure, not only a 1:1 relationship, but also an m:n relationship is possible.
If there are other solutions for this, a tip would be very helpful