cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rkaur
Level: Powered On

How to Patch all items of gallery (which is based on a child entity(datasource)) on a button click, onto a related parent entity record.

Hi,

 

Im using PATCH funtion to create all items of my gallerry as a related child record of may parent entity.

parent Entity - case (A)

child entity- custom entity (B) exposed as a subgrid on A's form

 

issue 1 - need to pass parent entity's record identfier as a column value with which gallery items have to be associated 

issue 2 - How to pass label's value to column update. label.Text is throwing error

 

Below is a screen of a gallery "Checklist" ( child datasource B)   which is navigated to from a browse gallery "Browsegallery1"of Datasource A.

"xyz_jobcard" is the lookup record to parent entity on child entity. N:1

Its value is coming from Browse gallery s have used gallery.selected.<field name>

which isnt working to identify.

Task type is a label "TaskName" not abel to pass task name to parameter xyz_tasktype:TaskName

 

taskname.text is failing.

To patch all items have used ForAll

 

Patch('Service Tasks',ForAll(ChecklistGallery.AllItems, {xyz_completed : Checkbox3.Value, xyz_tasktype : TaskName, xyz_jobcard :BrowseGallery1.Selected.'Case Title'}))

 

patch function.PNG

 

Kindly suggest how to pass parent entity record identifier to patch column.

and also how to pass label name

2 REPLIES 2
Community Support Team
Community Support Team

Re: How to Patch all items of gallery (which is based on a child entity(datasource)) on a button click, onto a related parent entity record.

Hi @Rkaur ,

 

First of all, you need to confirm what are the column types of the related columns "xyz_completed”“xyz_tasktype”“xyz_jobcard”? Different types need different parameters in Patch function.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Rkaur
Level: Powered On

Re: How to Patch all items of gallery (which is based on a child entity(datasource)) on a button click, onto a related parent entity record.

xyz_completed” - Two options in CRM. exposed as checkbox in powerapp

“xyz_tasktype” and “xyz_jobcard” are both type=lookup in CRM

xyz_tasktype added as label on Checklistgallery 

xyz_jobcard value is coming from BrowseGallery

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 165 members 4,260 guests
Please welcome our newest community members: