cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rmorley
Level: Powered On

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.

 

 

 

 

View solution in original post

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.

 

 

 

 

View solution in original post

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
thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,848)