Skip to main content
January 25, 2023
Question

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

  • January 25, 2023
  • 2 replies
  • 0 views

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
    January 25, 2023

    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
    January 25, 2023

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