cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

LookUp function

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: LookUp function

Hi @Marlin-A ,

 

Please check the bold.

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

Sik

 

 

View solution in original post

12 REPLIES 12
Highlighted
Helper V
Helper V

Re: LookUp function

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)

Highlighted
Helper IV
Helper IV

Re: LookUp function

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!

Highlighted
Helper IV
Helper IV

Re: LookUp function

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

Highlighted
Helper V
Helper V

Re: LookUp function

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

 

e.g.

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

 

Highlighted
Helper IV
Helper IV

Re: LookUp function

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!

Highlighted
Community Support
Community Support

Re: LookUp function

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

Highlighted
Helper IV
Helper IV

Re: LookUp function

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!

Highlighted
Community Support
Community Support

Re: LookUp function

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

Highlighted
Helper IV
Helper IV

Re: LookUp function

Hello @v-siky-msft 

 

Here's the error now. set.PNG

 

Thank you!

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,747)