web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Patching into a Customer Field From a Collection

(0) ShareShare
ReportReport
Posted on by 8

Hi,

 

Working on a canvas app to create intersect records between the standard 'Accounts' entity and a custom 'Events' entity.  The intersect is called 'Event Participation'.  It is a manual N:N.  The record has a look-up field called "Event Participation ID", which is the ID of the Events record.  It also has an 'Attendee' field which is defined as a customer data type.  Originally we were accepting Account or Contact attendee information, but now it's all Accounts.  I have created a gallery that is populated by a collection of all Accounts.  This helps me avoid delegation issues and also to reshape the data by adding an 'IsChosen' field.  In the gallery, users can push a button on each row to send that row to the 'Events Participation' intersect and it works well.  The issue happens when they select multiple rows via the "IsChosen" check-box and I use that to do a 'ForAll' patch to the 'Events Participation.  Below are some screen shots of the app, and also the button's on-select code for the 'ForAll' patch.  Not sure what I'm doing wrong.  It will create a record in Events Participation for each selected row in the gallery, but doesn't set the Attendee.

 

Button's code:

ForAll(
Filter(
colAccountDat,
IsChosen
),
Patch(
[@'Events Participation'],
Defaults([@'Events Participation']),
{'Event Participation ID': [@ModelDrivenFormIntegration].Item},
{
Attendee: {
ID: colAccountDat.accountid,
Value: colAccountDat.name
}
}
)
)

 

Any help anyone could provide would be greatly appreciated.

 

EmbeddedCanvasApp.pngButtonForAllPatch.png

  • Power Platform Communities Profile Picture
    8 on at

    I've solved this issue with some help from Shane Young and PowerApps911.  To achieve the patch, I take advantage of the new "As" functionality:

     

    ForAll(Filter(AccountGallery.AllItems, gCheck.Value = true) As InRec,
    Patch(
    [@'Events Participation'],
    Defaults([@'Events Participation']),
    {
    Attendee: InRec,
    'Event Participation ID': [@ModelDrivenFormIntegration].Item
    }
    ));

  • schots Profile Picture
    10 on at

    Many online software and applications are available which providing the best-written tips for collecting the customer fund. Most of the people get one of the best-written options on the britishessays.net site page which offers useful tips for students who want to get the best writing samples to complete any kind of writing work.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 39 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 37 Super User 2026 Season 2

#3
Subra Profile Picture

Subra 24 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans