Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Get Unique Identifier (ProjectGUID) out of global variable and save it with patch in LookupColumn

(0) ShareShare
ReportReport
Posted on by 39

Hello everyone,


I have the following two tables. Projects and goals that have a one-to-many relationship. The Goals table has a lookup column "projects"

I would like to have the GUID of projects to be written into the respective goal column so that a goal can be assigned to a respective project.

I have saved the complete data set in a global variable. I dont know, how to get the GUID with the global Variable. However, this shows me the following error message:

 

Patch(
goals,
Defaults(goals), // new record
{
goaldescription: 'inp Step goals goalstep.Text,
projects: vprojects.ProjectGUID
}
);


"The type of this argument '...' does not match the expected type 'Record'. Found typ 'Guid'. The function 'patch' has some invalid arguments.

  • charlessexton Profile Picture
    charlessexton 878 on at
    Re: Get Unique Identifier (ProjectGUID) out of global variable and save it with patch in LookupColumn

    You'll have to check what it's called in your table, but generally it will be the singular form of the table name.

     

    e.g.

     

    First(projects).Project
  • Marczii007 Profile Picture
    Marczii007 39 on at
    Re: Get Unique Identifier (ProjectGUID) out of global variable and save it with patch in LookupColumn

    Thanks for the answer, it worked. But how do i get the GUID instead of the primary name column (ID in Projects)? 🙂

  • Verified answer
    charlessexton Profile Picture
    charlessexton 878 on at
    Re: Get Unique Identifier (ProjectGUID) out of global variable and save it with patch in LookupColumn

    I'll assume you're using Dataverse. In which case, you don't specify the GUID for the patch function, you specify the record.

     

    Patch(
    goals,
    Defaults(goals), // new record
    {
    goaldescription: 'inp Step goals goalstep.Text,
    projects: vprojects
    }
    );

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard