Test5
Problem
This query return subpages of current page but also subobjects contained therein:
{{#ask:
[[~{{FULLPAGENAME}}/*]]
|format=ul
}}
Filtering pages by '#' character in the page name
Trying to exclude pages with page name containing '#' produces no results:
{{#ask:
[[~{{FULLPAGENAME}}/*]]
[[!~*#*]]
|format=ul
}}
If we escape '#' nothing is filtered:
{{#ask:
[[~{{FULLPAGENAME}}/*]]
[[!~*\#*]]
|format=ul
}}
Filtering by a substring of the subobject id works fine:
{{#ask:
[[~{{FULLPAGENAME}}/*]]
[[!~*sub*]]
|format=ul
}}
Adding '#' (escaped or not) to the "not like" conditions replicates the above results:
{{#ask:
[[~{{FULLPAGENAME}}/*]]
[[!~*#sub*]]
|format=ul
}}
{{#ask:
[[~{{FULLPAGENAME}}/*]]
[[!~*\#sub*]]
|format=ul
}}
Now we try to return only pages with page name containing '#', unsuccessfully:
{{#ask:
[[~{{FULLPAGENAME}}/*]]
[[~*#*]]
|format=ul
}}
Escaping '#':
{{#ask:
[[~{{FULLPAGENAME}}/*]]
[[~*\#*]]
|format=ul
}}
Filtering subobjects by text properties
A text property whose value is equal to the page name as returned above is defined in subpages and subobject.
Excluding pages with property containing '#' does not filter anything:
{{#ask:
[[~{{FULLPAGENAME}}/*]]
[[SomeTestProperty::!~*#*]]
|?SomeTestProperty
}}
| SomeTestProperty | |
|---|---|
| Carlo666/Test/Test5/Page1 | Carlo666/Test/Test5/Page1 |
| Carlo666/Test/Test5/Page2 | Carlo666/Test/Test5/Page2 |
| Carlo666/Test/Test5/Page2 | Carlo666/Test/Test5/Page2#sub1 |
Same results when '#' is escaped:
{{#ask:
[[~{{FULLPAGENAME}}/*]]
[[SomeTestProperty::!~*\#*]]
|?SomeTestProperty
}}
| SomeTestProperty | |
|---|---|
| Carlo666/Test/Test5/Page1 | Carlo666/Test/Test5/Page1 |
| Carlo666/Test/Test5/Page2 | Carlo666/Test/Test5/Page2 |
| Carlo666/Test/Test5/Page2 | Carlo666/Test/Test5/Page2#sub1 |
Selecting only pages with property containing '#' produces the expected result:
{{#ask:
[[~{{FULLPAGENAME}}/*]]
[[SomeTestProperty::~*#*]]
|?SomeTestProperty
}}
| SomeTestProperty | |
|---|---|
| Carlo666/Test/Test5/Page2 | Carlo666/Test/Test5/Page2#sub1 |
When '#' is escaped no result is returned:
{{#ask:
[[~{{FULLPAGENAME}}/*]]
[[SomeTestProperty::~*\#*]]
|?SomeTestProperty
}}