cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NickK
Helper I
Helper I

Adding a 'wait second' to a function

Hello, 

 

I have a text input box that is used to populate my gallery page. The textinput is set to blank and when user types, it will start populating results that match below. 

 

The problem:

I've found that as the user types it populates results and the app gets a little hung up as you type becuase it keeps trying to pull different records as you add each letter. 

 

The question:

Is it possible to add something in the function (or formula), to tell it to wait a second before it populates the gallery. In other words, it gives the user a second to finish typing the search before it populates the gallery page. 

 

Here is my current code that is pulling records. 

SortByColumns(Search(Table1,TextInput1.Text,"ADDRESS","CITY","Mall Name","Location / Dealer Name (Primary)"),"Location / Dealer Name (Primary)")

Any help will be greatly appreciated!

Nick

 

1 ACCEPTED SOLUTION

Accepted Solutions
CarlosFigueira
Power Apps
Power Apps

You can use the 'DelayOutput' property of the text input control - that will give you exactly (*) what you want, a delay between the time the user is typing in the text input and the moment its Text property is updated. If that property is set to true, the output property is only updated after the user stops typing (for half a second).

 

(*) Not exactly, as the delay that is added is of 500ms instead of a second, but it should help your scenario.

View solution in original post

2 REPLIES 2
CarlosFigueira
Power Apps
Power Apps

You can use the 'DelayOutput' property of the text input control - that will give you exactly (*) what you want, a delay between the time the user is typing in the text input and the moment its Text property is updated. If that property is set to true, the output property is only updated after the user stops typing (for half a second).

 

(*) Not exactly, as the delay that is added is of 500ms instead of a second, but it should help your scenario.

Thank you! works perfectly

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,604)