cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

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
Highlighted
Solution Supplier
Solution Supplier

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
Highlighted
Solution Supplier
Solution Supplier

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

Highlighted
Community Support
Community Support

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

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

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