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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

LookUp function

(0) ShareShare
ReportReport
Posted on by 269

Hello Guys 

Just want to seek  help about this my LookUp Formula. I don't know what's the problem on this.
What am I doing is that I want to call the group name on my screen based on the person who is currently logged in.

Here's my sp list of Members, inside my  Members list LookUp the GroupAssignment with GroupName on my Groups list.

set.PNGMembers (1).jpg

and here is the formula I used to get the GroupName based on the MemberName(or the one who is logged in) 

first I set the GroupAssignment. on Onstart property of the App.Formula.PNG

Then I LookUp the textbox to see what GroupName I belong but it returns me this error.

error.png1.PNG

Please Help.

 

Thank you!

Categories:
  • Digital Profile Picture
    1,207 on at

    Try switching the Groups lookup, so it'd be as follows:

     

    Lookup(Groups, ID = varGroupNum, GroupName)

     

    Also make sure that varGroupNum is actually a number and not text. If it is text you could amend your formula as follows:

     

    Lookup(Groups, ID = Value(varGroupNum), GroupName)

  • Marlin-A Profile Picture
    269 on at

    Hello @Digital ,

     

    Still not good. It says invalid argument, I also checked the App Check but it is just giving me an invalid argument on equals (=) sign.

    Thank you for your response.

     

    Thank you!

  • Marlin-A Profile Picture
    269 on at

    Hello Guys, 

     

    Just an update. 

    It seems my formula is okay but it's data type is in Table.

     

    I need to put this Value on my form which is a text data type. Do you have guys any idea on how can I change a Data Type?

    set.PNG

  • Digital Profile Picture
    1,207 on at

    Try appending your formula with .Id or .Value, depending on what you want.

     

    e.g.

    Lookup(Groups, ID = varGroupNum, GroupName).Value

     

  • Marlin-A Profile Picture
    269 on at

    Hello @Digital ,

     

    It still not work it's data type still on table. what I need right now is to change it's data type to string or text to make the value on table visible on a text box. 

     

    Thank you!

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Marlin-A ,

     

    Since the GroupAssignment is the LookUp column, so the varGroupNum is saved as a table containing Id and value columns of related Group record.

    If you want to see the GroupName, please try this:

     

    Lookup(Groups, ID = varGroupNum.Id, GroupName)

     

    or

     

    varGroupNum.Value

     

    Hope this helps.

    Sik

  • Marlin-A Profile Picture
    269 on at

    Hello @v-siky-msft ,

     

    Thanks but seems set.PNG invalid arguments because the ID's data type is a number and the varGroupnum is a table.

     

    Thank you!

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Marlin-A ,

     

    In general, that should be a record.

    Could you please try this?

    Lookup(Groups, ID = First(varGroupNum).Id, GroupName)
    or
    First(varGroupNum).Value

    Sik

  • Marlin-A Profile Picture
    269 on at

    Hello @v-siky-msft 

     

    Here's the error now. set.PNG

     

    Thank you!

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Marlin-A ,

     

    Please check the bold.

    Lookup(Groups, ID = First(varGroupNum).Id, GroupName)

    Sik

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard