I have a Parent Summary interface that I want to add a record action button to that creates an entry in a child table. Adding the button is easy enough, however adding that button alone doesn't connect the Parent to the child when using the button. So what steps am I missing to make that connection?
Discussion posts and replies are publicly visible
Lots of detail is missing here. What does the button "do"? Generally a related action will launch a process model, but what have you configured / tried within this process model? What information are you passing in? At a minimum I'd hope you're already passing in the primary identifier information (in whatever form), though it's unclear what else you might be doing here to create the child (a user form? a fully automated process? something else?).
The idea is simply for a user to be able to be looking at the Summary view of the parent record, click the button to create a child record, which would bring up the add interface for the child record, which has a field for the parent id field, which should be already populated with the parent id to make that connection. It sounds like getting that parent id to pull down to the child is set up in the process model?
In the most generic sense: the process model would have a PV (set as a parameter) in which you'd pass in the parent primary key ID. From the user's perspective, when set up correctly, it would be as simple as clicking the button (then filling out any required extra fields/etc). Is there anything in particular you're having trouble with here?
Yes, setting up that "PV (set as a parameter)" in the process model to pass in the parent primary key ID. Does that happen in the Write Record node? The basic training on Process Models doesn't cover this.
This refers to the simple action of adding a PV, which I assumed the basic training covered.
In the process model which you will be using for related action you'd create a process variable which is to be set as Parameter which means that the value in this variable will be required at the start of the process. So in your related action setup from Record Type, you will pass the value for that paramter pv! in the context of the related action.
Have you already completed the Appian developer course available on Academy Online ? I think these are very basic questions and you should first go through basic courses which are required to get started with Appian.
This should be done in the Process Model for Creating the child record correct? What should go in the Value field?
*The basic training did cover adding a PV to the process model but it was in totally different context than this.
cls5469 said:This should be done in the Process Model for Creating the child record correct?
cls5469 said:What should go in the Value field?
Nothing. A pv being elected as a "parameter" implies that the value will be supplied at run-time. In this case you'd pass it in as process context in your Related Action configuration.
Yes I have completed the basic coursed online and continue to reference them, however understanding the content seems to be my problem.
Let's explore this from the use case example in the Acme Automobile Reference Application, available on your Community Edition Site. Users should be able to request maintenance on a vehicle. They would achieve this by going to the summary view of the specific vehicle they want to request maintenance on. They would then choose the related action > Request Maintenance. A process would kick off that would pass the vehicleId into the process from the record. This is done in the Context of the related action within the Record Type object. This is important as this is how the vehicleId gets attached to the maintenance request. By the end of the process, a Write Record smart service writes the data to the maintenance table.
Be sure the context of your related action is properly configured to pass the primary key of the record you are on, into the appropriate field in your process to be part of the data that will be written.
Hope this helps!
© 2024 Appian. All rights reserved.