cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Help with Searchbox

Hi Everyone

 

Need some assistance with my searchbox.

I have 2 gallerys;

1. FilterGallery - This has the team names

2. IncidentOwnerGallery - This has the output from choosing the team name from Filter Gallery.

 

What I would like is a search box that can look for the following column names in the sharepoint list;

Incident Tracking ID - Single text

Incident Rating - Choice 

Below is a snip of my app

 

RubesandBoogs_0-1592984532627.png

Thanks for any help I can get to resolve this.


Rae

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous ,

Since team name field's data type is Choice , so my previous formula needs a little change:

1)FilterGallery's Items:

Choices('Risk Incident Form'.'team name')

2)IncidentOwnerGallery's Items:

Filter('Risk Incident Form',
'team name'.Value=FilterGallery.Selected.Value,
If(IsBlank(tbSearchInput.Text ),true,
tbSearchInput.Text in 'Incident Tracking ID' ||
tbSearchInput.Text in 'Incident Rating'.Value
   )
)

 

Delegation warning:

Could you tell me how many records are there in your data source?

If it is less then 2000 records, you just need to change the delegation warning to 2000.

delegation.jpg

 Then the delegation warning will not affect your app's performance.

 

 

If your data source has more than 2000 records, then you need to use collection to avoid the effect of delegation.

Firstly, save your data source to collection.

Set your app's OnStart:

ClearCollect(collection1,'Risk Incident Form')

Then filter on that collection instead of your data source.

IncidentOwnerGallery's Items:

 

Filter(collection1,
'team name'.Value=FilterGallery.Selected.Value,
If(IsBlank(tbSearchInput.Text ),true,
tbSearchInput.Text in 'Incident Tracking ID' ||
tbSearchInput.Text in 'Incident Rating'.Value
   )
)

 

 

 

Best regards,

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

View solution in original post

10 REPLIES 10
WarrenBelz
Super User
Super User

Hi @Anonymous ,

Try this - you will get a delegation warning, but this working will depend on the size (number of records) of your data.

Filter(
   YourListName,
    YourSearchBoxName.Text in 'Incident Tracking ID' ||
    YourSearchBoxName.Text in 'Incident Rating'.Value
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

Hi Warren

 

thanks for the reply, I have put the suggestion in my app and get the following 

Filter('Risk Incident Form',tbSearchInput.Text in 'Incident Tracking Id:' ||tbSearchInput.Text in 'Incident rating:'.Value)

 

any ideas?

 

Rae

Hi @Anonymous ,

Could you tell me where's the problem about the formula provided by @WarrenBelz ?

It seems that has problem.

 

Back to my understanding, do you want to filter based on the search box and the selected team name?
If so, could you tell me the team name field's data type?

I assume that it is text type.

If so, you need to set like this:
1)FilterGallery's Items:

Distinct('Risk Incident Form','team name')

2)IncidentOwnerGallery's Items:

Filter('Risk Incident Form',
'team name'=FilterGallery.Selected.'team name',
If(IsBlank(tbSearchInput.Text ),true,
tbSearchInput.Text in 'Incident Tracking ID' ||
tbSearchInput.Text in 'Incident Rating'.Value
   )
)

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for reaching out....

The team name field's data type is Choice 

I am wanting the following  columns to show  when an entry is typed into the searchbox ( searchbox is called tbSearchInput) when a team name is chosen from the FilterGallery.

Incident Tracking ID - Single Line of Text

Incident Rating - Choice

 

I just cannot get it to work.... any help would be apprieciated.


Rae

 

 

Hi @Anonymous ,

Are you field names exactly correct here?

Filter(
   'Risk Incident Form',
   If(
      IsBlank(tbSearchInput.Text),
      true,
      tbSearchInput.Text in 'Incident Tracking Id:' ||
      tbSearchInput.Text in 'Incident rating:'.Value
   )
)

I have added the condition for a blank text box, but that does not affect the logic of the rest of it.

 

Anonymous
Not applicable

Hi @WarrenBelz 

 

Here is how I have put the script you have advised,

 

Filter('Risk Incident Form',If(IsBlank(tbSearchInput.Text),true,tbSearchInput.Text in 'Incident Tracking Id:'||tbSearchInput.Text in 'Incident rating:'.Value))

 

however it shows a delegation warning which I get but when I go to use the searchbox, nothing filters

 

RubesandBoogs_0-1593064556369.png

 

Hi @Anonymous ,

The code is valid, however as I said at the start there is a Delegation issue. How big is the data set 'Risk Incident Form' you are querying?

If it is over 2000 records, then you certainly will have issues with the in filter. If however the data you are looking for is always in the newest 2000 records, try this first (run from a button or similar)

ClearCollect(
   colIncident,
   Sort(
      'Risk Incident Form',
      ID,
      Descending
   )
)

then your Filter should work

Filter(
   colIncident,
   If(
      IsBlank(tbSearchInput.Text),
      true,
      tbSearchInput.Text in 'Incident Tracking Id:' ||
      tbSearchInput.Text in 'Incident rating:'.Value
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Hi @Anonymous ,

Since team name field's data type is Choice , so my previous formula needs a little change:

1)FilterGallery's Items:

Choices('Risk Incident Form'.'team name')

2)IncidentOwnerGallery's Items:

Filter('Risk Incident Form',
'team name'.Value=FilterGallery.Selected.Value,
If(IsBlank(tbSearchInput.Text ),true,
tbSearchInput.Text in 'Incident Tracking ID' ||
tbSearchInput.Text in 'Incident Rating'.Value
   )
)

 

Delegation warning:

Could you tell me how many records are there in your data source?

If it is less then 2000 records, you just need to change the delegation warning to 2000.

delegation.jpg

 Then the delegation warning will not affect your app's performance.

 

 

If your data source has more than 2000 records, then you need to use collection to avoid the effect of delegation.

Firstly, save your data source to collection.

Set your app's OnStart:

ClearCollect(collection1,'Risk Incident Form')

Then filter on that collection instead of your data source.

IncidentOwnerGallery's Items:

 

Filter(collection1,
'team name'.Value=FilterGallery.Selected.Value,
If(IsBlank(tbSearchInput.Text ),true,
tbSearchInput.Text in 'Incident Tracking ID' ||
tbSearchInput.Text in 'Incident Rating'.Value
   )
)

 

 

 

Best regards,

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

@v-yutliu-msft thank you for repeating and confirming my post.

@Anonymous happy to assist further if this does not solve your problem.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,854)