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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get Unique Identifier ...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 41

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.

Categories:
I have the same question (0)
  • Verified answer
    charlessexton Profile Picture
    Super User 2024 Season 1 on at

    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
    }
    );
  • Marczii007 Profile Picture
    41 on at

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

  • charlessexton Profile Picture
    Super User 2024 Season 1 on at

    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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard