Diagnose a missing Store global attribute through group and family mappings
Trace one missing Store field through its definition, label, group, family, and entity mappings, then identify the exact relationship to investigate.
Try the Store-setting experience
Change a fictional Store’s support label and see the display rules in action. This demonstrates the result; SQL and Razor run in your Znode environment.
Open interactive preview
In this guide
- Store global definition
- Localized label
- Intended Store group
- Store family and entity mappings
- Store Admin form
Start with the Store form
A Store setting exists in metadata but does not appear on the intended Admin form. First distinguish a missing field from a visible field with an empty value. The definition, locale, group, family, and Store entity relationship all need to match the form being inspected.
Use the fictional GcgSupportLabel attribute from the Store SQL migration recipe. Select the intended Store group and family explicitly. Do not apply the field to every family as a troubleshooting shortcut. Product PIM attributes have a separate diagnostic path described in the product-attribute migration guide.
Resolve one intended relationship path
Set the attribute, locale, group, and family codes for the Store form you expect to see. The query starts from the Store definition and uses LEFT JOIN for later relationships, so the definition stays visible when a label or mapping is missing.
Read the result from left to right: definition, localized label, intended group, attribute-to-group mapping, intended family, family-to-group mapping, then group-to-entity mapping. No row means the Store definition was not found. Multiple rows require the duplicate checks in the supplement before any repair.
inspect-store-global-attribute-mapping.sql sql
DECLARE @AttributeCode nvarchar(300) = N'GcgSupportLabel';
DECLARE @GroupCode varchar(200) = 'GcgContent';
DECLARE @FamilyCode varchar(200) = 'Store';
DECLARE @LocaleCode nvarchar(50) = N'en-US';
SELECT a.GlobalAttributeId, a.AttributeCode,
l.GlobalAttributeLocaleId, l.AttributeName,
g.GlobalAttributeGroupId,
ag.GlobalAttributeGroupMapperId,
f.GlobalAttributeFamilyId,
fg.GlobalFamilyGroupMapperId,
ge.GlobalGroupEntityId
FROM dbo.ZnodeGlobalEntity AS e
JOIN dbo.ZnodeGlobalAttribute AS a
ON a.GlobalEntityId = e.GlobalEntityId
LEFT JOIN dbo.ZnodeLocale AS loc
ON loc.Code = @LocaleCode AND loc.IsActive = 1
LEFT JOIN dbo.ZnodeGlobalAttributeLocale AS l
ON l.GlobalAttributeId = a.GlobalAttributeId AND l.LocaleId = loc.LocaleId
LEFT JOIN dbo.ZnodeGlobalAttributeGroup AS g
ON g.GroupCode = @GroupCode AND g.GlobalEntityId = e.GlobalEntityId
LEFT JOIN dbo.ZnodeGlobalAttributeGroupMapper AS ag
ON ag.GlobalAttributeGroupId = g.GlobalAttributeGroupId
AND ag.GlobalAttributeId = a.GlobalAttributeId
LEFT JOIN dbo.ZnodeGlobalAttributeFamily AS f
ON f.FamilyCode = @FamilyCode AND f.GlobalEntityId = e.GlobalEntityId
LEFT JOIN dbo.ZnodeGlobalFamilyGroupMapper AS fg
ON fg.GlobalAttributeFamilyId = f.GlobalAttributeFamilyId
AND fg.GlobalAttributeGroupId = g.GlobalAttributeGroupId
LEFT JOIN dbo.ZnodeGlobalGroupEntityMapper AS ge
ON ge.GlobalAttributeGroupId = g.GlobalAttributeGroupId
AND ge.GlobalEntityId = e.GlobalEntityId
WHERE e.EntityName = N'Store' AND e.IsActive = 1
AND a.AttributeCode = @AttributeCode;
If GlobalAttributeGroupId has a value but GlobalAttributeGroupMapperId is null, the group exists and this attribute is not mapped to it. If both are null, the group code or entity does not resolve as expected. Apply the same distinction to the family and its mapping. A null value identifies a relationship to investigate, not permission to insert it automatically.
Repair only the missing edge you own
Compare the intended path with a known working Store global attribute of the same type. A null group ID means the intended group was not found. A group ID with a null attribute/group mapper ID means the group exists but the attribute is not associated with it. Apply the same distinction to family and entity mappings.
If the definition belongs to a different entity or has an incompatible type, stop. A blind mapping insert will not correct that design. Add a reviewed forward migration with entity-scoped lookups, duplicate checks, and preserved administrator values; the Store SQL migration recipe provides a bounded example.
Verify the Store editor and value read
Open the intended Store in Admin, locate the field, save a sample support label, and reopen the form in the same locale. Read that value through the Store global-attribute service used by your application. Confirm that an unrelated Store value and existing localized labels are unchanged.
Record the Store, locale, group, family, and application readback with the correction. Product publishing does not verify this Store setting. Product attributes use the separate PIM definition, family, value, and published-product paths.
Find duplicate labels or group mappings for one Store attribute
Run with the same GcgSupportLabel code used in the guide. After requiring exactly one Store definition, the query reports repeated locale IDs or attribute/group pairs. A row with Finding 'locale' and MatchingRows 2 means that attribute has two label rows for the reported locale. No result rows means these two duplicate checks found no issue; it does not verify every family or entity relationship. The query reads data and performs no repair.
inspect-global-attribute-duplicates.sql sql
DECLARE @Code nvarchar(300) = N'GcgSupportLabel';
DECLARE @AttributeId int;
IF (SELECT COUNT(*) FROM dbo.ZnodeGlobalAttribute AS a
JOIN dbo.ZnodeGlobalEntity AS e ON e.GlobalEntityId = a.GlobalEntityId
WHERE a.AttributeCode = @Code AND e.EntityName = N'Store') <> 1
THROW 51021, 'Expected one Store attribute definition.', 1;
SELECT @AttributeId = a.GlobalAttributeId
FROM dbo.ZnodeGlobalAttribute AS a
JOIN dbo.ZnodeGlobalEntity AS e ON e.GlobalEntityId = a.GlobalEntityId
WHERE a.AttributeCode = @Code AND e.EntityName = N'Store';
SELECT N'locale' AS Finding, LocaleId AS RelatedId, COUNT(*) AS MatchingRows
FROM dbo.ZnodeGlobalAttributeLocale
WHERE GlobalAttributeId = @AttributeId
GROUP BY LocaleId
HAVING COUNT(*) > 1
UNION ALL
SELECT N'attribute/group', GlobalAttributeGroupId, COUNT(*)
FROM dbo.ZnodeGlobalAttributeGroupMapper
WHERE GlobalAttributeId = @AttributeId
GROUP BY GlobalAttributeGroupId
HAVING COUNT(*) > 1;
References and further reading
Bring your next engineering question.
Need a Store configuration extension reviewed?
Independent guidance from GCG. Znode is a trademark of its owner. Examples use fictional data and are not official platform documentation. Suggest a correction.