Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Patching parent, child record error

(0) ShareShare
ReportReport
Posted on by 30

Hi,

 

I'm trying to patch parent/ child tables in single onselect event, like this

 

ClearCollect(
colEmployee,
Patch(
Employees,
{Employee:Blank()},
{'FIRST NAME':"Test patch"}
)
);
ClearCollect(
colEmployeeChanges,
Patch(
Employee_Changes,
{Employee_Change:Blank()},
{Employee:First(colEmployee).Employee},
{REQUESTOR:"Test patch"}
)
)

 

The error is saying that the expected type of argument is record while a guid is supplied instead.

 

The error refers to this line  {Employee:First(colEmployee).Employee}, 

 

Employee is lookup column in Employee_Changes tabe to an Employee table.

 

Could someone please advice id there's a way to convert types  or to do something similar to fix the issue.

 

Thanks!

  • Ram Prakash Profile Picture
    5,166 Super User 2025 Season 1 on at
    Re: Patching parent, child record error

    Hello @Andrew7345,

     

    If you are sure that {Employee:First(colEmployee).Employee} this Line is throwing error then you can try changing the same like below to make it work

     

    {Employee:LookUp(EMPLOYEETABLENAME,'FIELD FROM EMPLOYEE'=VALUE FROM COLLECTION)}

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

     

     

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics