Skip to main content
sivanagamalleswarit0003
October 10, 2022
Question

Better way to reuse particular a!queryRecordType

  • October 10, 2022
  • 8 replies
  • 0 views

I am using modern records/Sync records to create related actions. I have around 20+ related actions i need to define for an Interface. 
I have to pass the most common parameter for all 20 of them.

Example: I need to pass Case information into each related action, i am using a!queryRecordType to pass this info.

I am passing this 20 times for each 20 RA as mentioned, i am not happy with using it multiple times. I can create an expression rule for it alone and pass it; still it being called 20 times.

Is there a better approach to achieve it in single call and passing along to the remaining RAs????

 case:a!queryRecordType(
    recordType: 'recordType!{092e25cb-d859-498e-810c-ede1a27152dd}FAS Manage Case',
    fields: 'recordType!{092e25cb-d859-498e-810c-ede1a27152dd}FAS Manage Case.fields.{c59a2f56-2d82-405b-8012-f24f371ae9ab}id',
    filters: a!queryFilter(
      field: 'recordType!{092e25cb-d859-498e-810c-ede1a27152dd}FAS Manage Case.fields.{c59a2f56-2d82-405b-8012-f24f371ae9ab}id',
      operator: "=",
      value: rv!identifier
    ),
    pagingInfo: a!pagingInfo(1,1)
  )

Thanks in advance

    8 replies

    Participating Frequently
    October 10, 2022

    Hi, You can create an expression rule which will query your record and  add filters to it simply pass the filters values as rule inputs  and call the rule using rule!ruleName()

    Check this as well for more info https://docs.appian.com/suite/help/22.3/Expression_Rules.html

    sivanagamalleswarit0003
    October 11, 2022

    I can do this, but it still end up being called 20 times which i am not satisfied with. Atleast that is the least option if nothing comes up.

    Thank you Ujjwal

    harshitb6843
    October 11, 2022

    If this is the case record itself in which you are trying to configure the RA, then why not pass rv!record directly instead of querying it?

    stefanhelzle0001
    Brainy
    October 11, 2022

    I observed that the rv!domain is no fully populated, but just contains the fields as needed to display the record. In the end, I had to re-query the record. I did not deeply investigate this though.

    sivanagamalleswarit0003
    October 11, 2022

    I agree, i did tried passing rv!record directly which returned null and opted to queryrecord. I will explore more around it.

    Thank you Stefan

    namratak0001
    October 11, 2022

    I would suggest to just pass the rv!identifier from record to process model context and query the data in process model script task

    sivanagamalleswarit0003
    October 11, 2022

    I would need entire data but not just the identifier.. due to that ended up querying the Record.