Hi Team,
I have a scenario, where I need to add multiple assignees. To do this, I have created a user picker field and initially saving the inputs to a local variable. I want to save this data to a assignees record. where assignees record is in one to many relationship with meeting data record. This mean, the relationship record is multiple in my case and I was not able to save the list of assignees to the record. Can anyone help me?
Attaching the code for reference.
Discussion posts and replies are publicly visible
Harshit Bumb (Appyzie) Stefan Helzle Mike Schmitt
why are you trying to call a!save() inside an a!forEach() loop?
I tried saving all the data in local variable to array of record, so I tried calling in foreach.
That's not a valid way to structure it.
Can you provide more detail about the relationship betwene the "local!attendee" variable and the row(s) of "ri!meetingInfo"? How many MeetingInfo rows do you start out with? How are they supposed to be matching up (if at all)?
Or are you simply allowing the user to add any number of attendees and each one should be getting its own, brand new, row of "meetinginfo"? (The code provided in your screenshot doesn't really tell us enough info to even guess at this, and it all makes a difference as to the ultimate suggested implementation).
initially I am saving all users from user picker to "local!attendee" as an array of users. and then after clicking the button I am trying to save each attendee to different rows in record in "ri!meetinginfo".
sri123 said:trying to save each attendee to different rows in record in "ri!meetinginfo".
saveInto: { a!save( ri!meetingInfo, a!forEach( local!attendee, 'recordType![meeting]'( 'recordType![meeting].fields.{attendee}attendee': fv!item ) ) ) }
(you will need to correct the record type / field references since record type references copy/paste as gibberish here)
Thank you Mike Schmitt , this helped to resolve the issue.
Referdocs.appian.com/.../Multiple_Dropdown_Component.html
Great, thanks for confirming.
Unable to see the Just ask question button in the community