<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Pass relationship field in process variable</title><link>https://community.appian.com/discussions/f/process/27223/pass-relationship-field-in-process-variable</link><description>Hi all hope someone can help. 
 
 I am working on an integration in a process model 
 
 and I want to pass some variables to the integration step 
 I am assigning a recordtype value to the inputs in the data tab 
 
 
 all works for division for example</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Pass relationship field in process variable</title><link>https://community.appian.com/thread/106928?ContentTypeID=1</link><pubDate>Fri, 20 Jan 2023 09:12:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d84691ce-46eb-4711-b24e-b40dfd27d8a9</guid><dc:creator>catev8891</dc:creator><description>&lt;p&gt;thank you for the Hint Hrishikesh!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Posting here the final code I had to use to reference a relationship field to a record type in the value field of the Data inputs tab&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;= index(
  a!queryRecordType(
    recordType: NJW NewJoiner,
    fields: {
      NJW NewJoiner.relationships.njwPicklistGhDepartment.fields.id&amp;#39;
     },
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 1),
    filters: a!queryFilter(
      field: recordType!NJW NewJoiner.fields.id,
      operator: &amp;quot;=&amp;quot;,
      value: pv!record[&amp;#39;recordType!NJW NewJoiner.fields.id]
    )
  ).data[&amp;#39;recordType!NJW NewJoiner.relationships.njwPicklistGhDepartment.fields.id&amp;#39;],
  1,
  cast(
    &amp;#39;recordType!NJW NewJoiner&amp;#39;,
    null
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pass relationship field in process variable</title><link>https://community.appian.com/thread/106828?ContentTypeID=1</link><pubDate>Wed, 18 Jan 2023 03:45:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:99acbf74-235c-427c-ab91-1fd0102f6b9b</guid><dc:creator>hrishikeshd997</dc:creator><description>&lt;p&gt;To use relationship data, relationship have to be explicitly specified in &amp;quot;fields&amp;quot; parameter while querying the record.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/22.4/Create_a_Record_View.html"&gt;docs.appian.com/.../Create_a_Record_View.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/14/pastedimage1674012778835v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;After writing the record, you would need to query the record back specifying the relationship within the fields to use relationship data further in your process.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!queryRecordType(
    recordType: pv!record,
    fields: {pv!record.recordtypexxx.relationshipxxx},
    filters: /*query filter to fecth record by its ID*/
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pass relationship field in process variable</title><link>https://community.appian.com/thread/106823?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2023 18:15:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7d616749-051b-45fd-a96a-0691f8e3b7f8</guid><dc:creator>catev8891</dc:creator><description>&lt;p&gt;And the integration on its own works by passing test values in the ri! of the integration. So it&amp;#39;s all about passing the values in the ri! from the process model&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>