Skip to main content
September 23, 2025
Question

How to properly call record id for Related action

  • September 23, 2025
  • 3 replies
  • 0 views

Hello everyone, I’m new with Appian and I’m currently trying to work on a basic CRUD project.

I’m currently struggling to create an “Update” related action for my List.

1.- I have created a query expression rule to retrieve only the values of a specific record based on the id, which is currently working properly.

2.-I have created a related action inside my main Record Type to Update my record which has the following context for the process model parameter:

{

TSM_TaskList:

rule!TSM_queryTaskList(

                tasklistIdPk: rv!identifier

).data

}

3.- I have edited the list to add a grid for the “Update” button next to the record, and I added the following display value:

a!recordActionField(

                actions: a!recordActionItem(

                               action: recordtype!TSM_TaskList.action.updateTaskList,

                               identifier: fv!identifier

),

display: “ICON”

)

The button display successfully on the table for each record, however when I click on it, I get the following error:

“An error occurred while applying the context for the TSM Task List action [identifier=220,990]. Details: Expression evaluation error: TSM Task List can only be indexed into using square brackets or the index function”.

 

Can anyone help me identify where is my issue?

 

Or if you guys have a better approach on how to create a proper Update record action.

3 replies

shubhama926776
September 23, 2025

Mostly issue is, You were wrapping the record in a dictionary {TSM_TaskList: ...} when the process model expected a direct record type.
Remove your current code({TSM_TaskList: rule!TSM_queryTaskList(tasklistIdPk: rv!identifier).data}) and put rv!record (ensure your process model parameter accepts the Record Type as input).

Use built-in generation instead of manual configuration. See below for more detailed information.
Generate record actions
Configure Record Actions
https://www.youtube.com/watch?v=5AoKtZaMVIo&t=1s

harshas2775
September 23, 2025

rule!TSM_queryTaskList(

                tasklistIdPk: rv!identifier

).data

As per error when record action is invoked from user interface, the system is facing challenge in applying the context for the action (process model parameter). To resolve this suggest you to replace the above query rule code with rv!record as below then try! 

{TSM_TaskList:rv!record}

September 23, 2025

This could be happening because of a few reasons, and here's how you might narrow down where the error is:

  • Ensure that your expression rule TSM_queryTaskList is properly unit tested and returns expected results. Try testing it with your identifier 220990.
  • In your process model confirm that any references to the fields of pv!TSM_TaskList are using brackets / Appian's record field references, rather than a string / text.
  • Given the context of the error, I don't think the error is on the UI. But you can confirm by running your query expression rule with identifier 220990 as a test input to the UI that the PM references.