I have a repeating group of Menu Items that should filter by the page’s Location. The constraint returns 0 results even though every variable checks out. I’ve spent hours isolating this and ruled out the usual causes — details below.
Setup:
-
Page
menu, Type of content = Location -
Navigation to the page works: a button passes the Location via “Data to send”, and the URL contains the correct record
-
RG: Type of content = Menu Item, Data source =
Search for Menu Itemswith constraintlocation = Current page's Location -
locationis a field on Menu Item, field type = Location (a reference to the Location data type, not text)
What works:
-
Search for Menu Items:count(no constraint) returns 8 — correct -
A bare text element on the page set to
Current page's Location's nameshows the correct name -
A bare text element set to
Current page's Location's unique idshows the correct id:1779789786297x986001693172420500 -
Opening a Menu Item in App data and following its
locationfield leads to the Skt. Pauls Location record, whose unique id is the same id above — so the page’s Location and the items’ location field are provably the same record
What fails:
-
Search for Menu Itemswith constraintlocation = Current page's Locationreturns 0 -
Same result via
:filteredwith the equivalent condition -
Rebuilding the constraint from scratch (selecting the field fresh) — still 0
Already ruled out:
-
Privacy: every field on Menu Item and Location has View checked, and “Find this in searches” is checked. Unconstrained search returning 8 confirms searchability.
-
Not previewing the page directly — I always navigate from the index page via the button, and the unique id confirms the right Location arrives.
-
Data is not pointing at a deleted/other Location — IDs match exactly.
Question: Why would a reference-field constraint (location = Current page's Location) return 0 when both sides resolve to the same record by unique id, the field type is correct, and privacy is open? Is there a known cause for a Location-type constraint silently not matching even when the unique ids are identical?
Happy to share screenshots of the data types, privacy rules, the RG data source, and the debugger.