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 / Convert LookUp Field D...
Power Apps
Unanswered

Convert LookUp Field Data to Text for Comparison

(2) ShareShare
ReportReport
Posted on by 45
Hi there! Currently creating an HR Employee Self Service portal Power App. The users are able to clock in and out as needed, however, this process needs to be different based on the team the user is on. I have a Many-to-one relationship between my Employee Table and my Team table, where the Employee table now has a lookup field to the Team. If the user is on say Team A, they need to have a modified clock out process.
 
 
 
My current code OnStart of the app is as follows:
// assigned the current user to a variable on the employee table
Set(
    varCurrentEmployeeTeam,
    LookUp(Employees, 'Full Name' = User().FullName).Team
);
 
This appears to work, however I need to be able to compare this in a later if statement when the user clicks a button to clock out. That code currently goes as follows:
 
// first check if the employee is part of the tech ops team
If(
    varCurrentEmployeeTeam = "Technical Operations",
    // if they ARE tech ops
    // check if the list is empty, if so: allow clock out
    If(
        IsEmpty(varCaseList),
        Set(varAllowClockOut, true),
        // otherwise dont allow clock out
        Set(varAllowClockOut, false)
    ) + Set(varNumCases, CountRows('Current Active Critical Cases'.AllItems)) + UpdateContext({varTechOpsClockOutPopup:true}),
    UpdateContext({clockoutpopup:true})
);
 
The issue I am having resides in the first line of the if statement. Due to the variable I created that grabs the Employee's team being a record data type, there is not a way to compare it to a text data type. Ideally, I believe it would be best to convert this record data to a text type data but I have been unsuccessful in doing so. If there are any other plausible solutions/workarounds I am very open to hearing what you have to say.
 
Thank you in advance for giving my post a read and for the possible help that may come!
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,335 Super User 2025 Season 2 on at
    Hi,
     
    I am guessing that one of the Columns has the actual string in it (like Name or something else)
     
    I am pretty sure its Name btw 
     
    Either
     
    1. after the word Team in your Lookup put another . (period) and look for the TEXT column you want. and done.
    Set(
        varCurrentEmployeeTeam,
        LookUp(Employees, 'Full Name' = User().FullName).Team.Name
    );
     

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard