Previous Step Results ($steps variable) not available in data picker for Element Actions

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets)

Within the interactions of an element, use the result of the prior step in a subsequent “Run element action” action.

When adding a Plasmic defined action as the subsequent action (e.g. Update state, Use integration), the “Previous step results” are explorable in the Plasmic Data Picker and the $steps object is accessible in the code editor.



However, when adding a “Run element action”, some action from global context (or the “Show notification” action from antd as well), the “Previous step results” is not displayed in the Plasmic Data Picker and the $steps object is seemingly not accessible in the code editor according to intellisense.



Despite $steps.[yourActionName] not being available in the code editor according to intellisense, if manually added (e.g. copied from one of the methods that it exists above), despite Studio reporting “Error: $steps is not defined”, the value is returned and usable at runtime.

What are the reproduction steps?
Expected behaviour: Add one action to an element interaction. Add a second action that is something plasmic defined like “Update state”. Set a value based on the “Previous step results” in the data picker or $steps object in the code editor.
Issues scenario: Add one action to an element interaction. Add a second action that is a “Run element action”. Attempt to set a value based on the “Previous step results” in the data picker or $steps object in the code editor, noting not possible.
Workaround scenario: Add one action to an element interaction. Add a second action that is a “Run element action”. Manually set a value to $steps.[yourActionName] in the code editor. Observe the plasmic error but run the action anyway.

Expected result
$steps to be available for all actions added in the element interactions configuration modal.

1 Like

I also have experienced this bug. Hopefully this can be fixed so we can make better use of $steps between actions

Thank you for reporting this. I’ve opened an issue for it, and our team will investigate this soon.