Difference between rf! and rp! in Related actions

Hi,

In Records With in User Interfaces we find Related actions and we generally use rf! or rp! to fetch the values.

Can anyone let me know what is the difference in using rf! and rp! in related actions.

Thanks

  Discussion posts and replies are publicly visible

  • The rf! domain is the 'Record Field' domain - with this you can access a Record's attributes by their names. So, for example, if you wanted to access a Claim Record's primary key, and that primary key was named 'ClaimId' then you could use rf!ClaimId

    The rp! domain is the 'Record Properties' domain - with this you can access a Record's properties. Again, using the same example above, to access a Claim Record's primary key you could use rp!id.

    There may be some debate but I would recommend using the latter to access the Record's primary key in case it was ever re-named. Some may argue this is very unlikely, but I do see it happen where a project starts out and uses 'id' as their standard for the primary key for a Record, and then realise later that it may be better to name in the form <EntityName<Id> - so for a Record entity named 'Claim' then 'ClaimId' would be a more appropriate name. If you use the rp!id to get this value this will ALWAYS work, whereas if you'd used rf!id you'd have to edit that expression and change the reference to rf!ClaimId.

  • 0
    Certified Lead Developer

    Hi ,

    Here is the quick link to the documentation - https://docs.appian.com/suite/help/20.1/domain_prefixes.html#record-only-prefixes

    rf!- Refers to the Record Fields in the Data Structure Eg: rf!name - Refers the name field in the Record Data

    rp! - refers to the record properties. Eg: rp!id - Refers to the record identifier