Allow to use the result from the previous action in the next action
Let say you want to redirect to the newly created object detail page after creating a new instance. You should be able to reuse the id of the create_row action in the folowing "open_page" action.
Ref:
A few steps:
- The Upsert service should return the data schema like the data sources already do
- Separate the dispatchDataSourceContext to the dispatchActionContext. Form data provider should only send data on a dispatchActionContext
- Create a new PreviousActionDataProvider (frontend and backend).
- It needs the previous action results and the previous action list.
- It should use Schema from the backend for the update/create row and a fixed schema for the other actions.
- It should give the previous action results to the action dispatch context.
- Use this data provider in the formula fields of the actions
- Add the previous actions to the applicationContext of these formulas
- May be you have to provide the application context at some point?
Edited by Jérémie Pardou