Need help patching a new record to CDS via patch for lookup field. I am mirroring the solution from :https://powerusers.microsoft.com/t5/Common-Data-Service-for-Apps/Patching-User-Lookup-on-CDM/m-p/366...; however not successful...
Entity: Asset
Lookup Field: Asset_Location
ComboBox1: (Choices(Assets.Location))
Formula: Patch( Asset, Defaults(Asset), {Asset_Location: ComboBox1.Selected})
-
Result: Location field is blank.
Hi @FunGuy ,
The Items property of the combo box should be:
Choices(Assets.Location)
Please remove "()" and try again.
And for Patch formula, it seems that you only included the "Asset_Location" field. Please make sure that all the Required fields are included in Patch.
Regards,
Mona
I was able to patch the other fields required THEN patch the appropriate lookup field to that record; however, I am unable to execute them together in one patch line. Is it possible to make it all one execution given that the lookup requires an existing record?
Formula:
Patch(Asset, Defaults(Asset), {Asset_Name: "Test123"});
Patch(Asset, Lookup(Asset,Asset_Name="Test123"), {Location: Lookup(Locations_Table, Location_Name=Combobox1.Selected.Location_Name)})
Is it possible to store a lookup value (not as a text) in a collection?
I was thinking maybe Collect all the input data then use ForAll function to patch the specific lookup values.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
14 | |
5 | |
4 | |
4 | |
3 |
User | Count |
---|---|
20 | |
6 | |
6 | |
5 | |
4 |