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 Platform Community / Forums / Power Apps / Searching for components
Power Apps
Answered

Searching for components

(0) ShareShare
ReportReport
Posted on by 62

Hey,

 

I'm new to PowerApps and am trying a few different things. and currently I'm trying to fill a gallery with items from SharePoint. The SharePoint List is quite short and simple, it has 3 titles and 3 screen names. What I want to do is that I'd like to set the gallery buttons OnClick = Navigate(ThisItem.Screen), except that ThisItem.Screen is a text, and not an object to navigate to. What I wonder about is if it's at all possible to find the screen whos Screen.name = ThisItem.Screen

 

This is probably not the best way to navigate to a new screen based on SharePoint information

Categories:
  • pontusofsweden Profile Picture
    255 on at

    Hi @Mats_1997 !

     

    One way to solve this is to have a collection where you map the Screen name (text) in SP to the screen objects in Power apps. Like:

    ClearCollect(ScreenNames;{Name: "Screen2";ScreenName:Screen2};{Name: "Screen3";ScreenName:Screen3};{Name: "Screen4";ScreenName:Screen4})

     

    On the OnSelect of the buttons in the Gallery, use this formula and you will be directed to the correct screen:

    Navigate(LookUp(ScreenNames;Name = ThisItem.Screen;ScreenName);ScreenTransition.Cover)

     

    BR

    Pontus

     

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

    Hi @Mats_1997 ,

    Do you want to navigate to different screens based on selected item's field value?

    Please notice one thing: Navigate function's syntax:
    Navigate(screenname)

    The screenname in this function should be constant value. Using "ThisItem.Screen" in it is not supported.

     

    How to solve this? I suggest you use If statement to justify navigate to which screen.

    Try this:
    set the gallery buttons OnSelect:

    If(ThisItem.Screen="Screen1",Navigate(Screen1),
     ThisItem.Screen="Screen2",Navigate(Screen2),
     ThisItem.Screen="Screen3",Navigate(Screen3)
    )
    

     

     

     

    Best regards,

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 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard