Skip to main content
Known Participant
Jan 25, 2023 4:00 PM UTC
Question

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

Here are my record types:



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
*/

    2 replies

    petel0001Author
    Known Participant
    Jan 25, 2023 4:21 PM UTC

    Okay, apparently, there is some 'Magic' that happens when you use the Query Editor (https://docs.appian.com/suite/help/22.3/using-the-query-editor.html) to create the expression rule.
    When you create the rule manually you get the error shown in my previous posting.

    stefanhelzle0001
    Brainy
    Jan 25, 2023 6:04 PM UTC

    Did you check for the difference to your hand crafted code?