Pass relationship Record Type fields to Rule inputs in integration?

Hi I want to test an integration which should create a new record in an external system.

This is the code that creates a 'job', with its name, the department, an array for the offices ids and a template_job id

a!tojson({

  "job_name": "AppianFlow3"& " "&"Related data"&ri!record['recordType!NJW NewJoiner.relationships.njwGhOfficePicklist.fields.officegh']&ri!record['recordType!{1fc618ce-6255-402a-81f8-007ca9ca5de4}NJW NewJoiner.relationships.{925eac6a-be91-4fe5-b4a3-1009d480994a}njwGhOfficePicklist.fields.id']& "NJWRecordType"&ri!record['recordType!NJW NewJoiner.fields.division']&" "& ri!record['recordType!NJW NewJoiner.fields.businessmanagerapprover']&ri!record['recordType!NJW NewJoiner.fields.id'],
  "department_id":"4076573002",
  "office_ids":{"4036737002"} ,
  "template_job_id":"5468426002"
}
)

I want to test the integration by getting one record by id of the record type NJWNewJoiner and parse in the json request some fields from the NJWNewJoiner Record type as well as some fields coming from related record type njwGHofficePicklist

The rule input in the integration is called 'record' and it has a type of Recordtype!newjoiner.

When I test the integration with an expression that gets the njwNewJoiner record by id

 

I then get the following record successfully created in the external system 

AppianFlow3 Related dataNJWRecordTypeFacilities xxxx@xxxx.com20

which shows that the related data doesn't get populated whereas the njwnewjoiner data gets populated.

I created a many to one relationship between the two record types and I would expect Appian to behave as the following SQL

SELECT b.officegh, b.id, a.division, a.businessmanagerapprover, a.id

from njwnewjoiner a

left join njwGHofficePicklist b

on a.officename=b.officegh

Why is the related data not being passed?

I also created an interfacte to see if the the values were joined properly and it looks like it because against the record id 20 I get back all the correct values from record type newjoiner and the associated values from njwGHofficePicklist .

Can anyone help?

  Discussion posts and replies are publicly visible