cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rmorley
Level: Power Up

search

I am new to power apps 

i have created lots of screens (no gallerys) and i just want to create a search to take me to that screen title so when i type in my text box on screen 1 the name of say screen 8 i want it to take me to screen 8 is this possable

1 ACCEPTED SOLUTION

Accepted Solutions
K-A-R-L
Level 10

Re: search

Hi @rmorley ,

 

This is possible.

What you need to do add this to your AppStart() Property and make sure that you have added the same Screens on your app

 

ClearCollect(
    TestNavigationMenu,
    {
        Target: "Screen1", //Text for Label inside gallery
        Screen: Screen1 //Name of the Screen
    },
    {
        Target: "Screen2", //Text for Label inside gallery
        Screen: Screen2 //Name of the Screen
    },
    {
        Target: "Screen3", //Text for Label inside gallery
        Screen: Screen3 //Name of the Screen
    },
    {
        Target: "Screen4", //Text for Label inside gallery
        Screen: Screen4 //Name of the Screen
    }
);

 

Add a TextInput Field and a Gallery with a Label:

SearchGallery.jpg

 

On your gallery Items() Property add this code:

 

//If TextInput1 is blank the gallery is empty
If( !IsBlank(TextInput1.Text), //TextInput1 is the name of the TextInput Field Search( TestNavigationMenu, TextInput1.Text, "Target" //Target is the Screen Text Column on your collection ) )

On Gallery's Height():

CountRows(Gallery1.AllItems)*78 //Will change the height of the gallery depending 
on the rows returned on your results multiplied by the template size (78)

On Gallery's OnSelect():

Navigate(Screen)

Best of luck!

----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

 

 

 

 

2 REPLIES 2
K-A-R-L
Level 10

Re: search

Hi @rmorley ,

 

This is possible.

What you need to do add this to your AppStart() Property and make sure that you have added the same Screens on your app

 

ClearCollect(
    TestNavigationMenu,
    {
        Target: "Screen1", //Text for Label inside gallery
        Screen: Screen1 //Name of the Screen
    },
    {
        Target: "Screen2", //Text for Label inside gallery
        Screen: Screen2 //Name of the Screen
    },
    {
        Target: "Screen3", //Text for Label inside gallery
        Screen: Screen3 //Name of the Screen
    },
    {
        Target: "Screen4", //Text for Label inside gallery
        Screen: Screen4 //Name of the Screen
    }
);

 

Add a TextInput Field and a Gallery with a Label:

SearchGallery.jpg

 

On your gallery Items() Property add this code:

 

//If TextInput1 is blank the gallery is empty
If( !IsBlank(TextInput1.Text), //TextInput1 is the name of the TextInput Field Search( TestNavigationMenu, TextInput1.Text, "Target" //Target is the Screen Text Column on your collection ) )

On Gallery's Height():

CountRows(Gallery1.AllItems)*78 //Will change the height of the gallery depending 
on the rows returned on your results multiplied by the template size (78)

On Gallery's OnSelect():

Navigate(Screen)

Best of luck!

----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

 

 

 

 

Community Support Team
Community Support Team

Re: search

Hi @rmorley ,

Based on the needs that you mentioned, I think the combination of If function and Timer control could achieve your needs.

 

I have made a test on my side, please take a try with the following workaround:

Add a Timer control in your app, set the Duration property to following:

1000

set the AutoStart property and Repeat property to following:

true

set the OnTimerEnd property to following:

If(
   TextSearchBox1.Text = "Screen1",
   Navigate(Screen1);Reset(TextSearchBox1),    /* <-- TextSearchBox1 represents the text searach box in your app */
   TextSearchBox1.Text = "Screen2",
   Navigate(Screen2);Reset(TextSearchBox1),
   TextSearchBox1.Text = "Screen3",
   Navigate(Screen3);Reset(TextSearchBox1),
   ...
   TextSearchBox1.Text = "Screen8",
   Navigate(Screen8);Reset(TextSearchBox1),
   TextSearchBox1.Text = "Screen9",
   Navigate(Screen9);Reset(TextSearchBox1),
   TextSearchBox1.Text = "Screen10",
   Navigate(Screen10);Reset(TextSearchBox1),
   ...
)

set the Visible property of the Timer control to following:

false

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 116 members 4,604 guests
Please welcome our newest community members: