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 / Pass a Param into Look...
Power Apps
Unanswered

Pass a Param into LookUp function

(0) ShareShare
ReportReport
Posted on by 12

Hello everyone, 

is it possible to pass a parameter into a lookup-function? I am trying to get PowerApps to show a different screen based on what group a person is part of, like HR or IT. This parameter is dynamically assigned to the app's URL and given in a SharePoint list.

 

So I am trying to get this fixed solution:

GermanAutomator_0-1690901966595.png

changed into something like this:

GermanAutomator_2-1690902067985.png

 

But the argument is invalid. Is there a known workaround?

 

Thanks very much!

 

Categories:
I have the same question (0)
  • madlad Profile Picture
    2,637 Moderator on at

    You should be able to do something like this. Is Param("group") just the name of the datasource you want here? i.e. for IT would it just be "OE-IT"?

     

    If this is the case,

    I'm pretty sure you cannot dynamically pass the datasource for a lookup in like this. However, one thing you could try is something along the lines of:

     

    Set(
     IsUserMember;
     !IsBlank(
     Switch(
     Param("group");
     "OE-IT";
     LookUp(
     'OE-IT';
     Name.Email = User().Email
     );
     "OE-HR";
     LookUp(
     'OE-HR';
     Name.Email = User().Email
     );
     ect.
     )
     )
    )

     

     This should do what you need, although I'm not 100% sure it's the most efficient way to do this. You'll have to pass in the correct values for your departments of course.

     

    Hope this helps!

  • GermanAutomator Profile Picture
    12 on at

    That looks interesting, I'll definitely try that out. For me, it's not about efficiency, just functionality on this one.

     

    Yes, the name of my SharePoint list where the names are stored is the same as the parameter that is passed!

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

#2
Kalathiya Profile Picture

Kalathiya 361

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard