'You must reference the field from the related record type in "relationship".'??

Here are my record types:





Here is my rule expression:


Why am I getting the following error message when I try the expression out?

Expression evaluation error at function a!queryRecordType [line 5]: The field [recordType!SS Item.relationships.ssLookupCategoryItem.fields.categoryId] used as a sort field was invalid. You must reference the field from the related record type in "relationship".


This query works fine when in the Cloud Database area
/*
select * from
SS_LOOKUP_CATEGORY_ITEM,
SS_ITEM,
SS_CATEGORY
where
SS_LOOKUP_CATEGORY_ITEM.ITEM_ID=SS_ITEM.ID AND
SS_LOOKUP_CATEGORY_ITEM.CATEGORY_ID=SS_CATEGORY.ID
*/

  Discussion posts and replies are publicly visible