cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Axis_ER2019
Frequent Visitor

Gallery Data Not Current

I have created a PowerApp with a gallery that uses a sharepoint list as its datasource. The purpose of the gallery is to allow Admin users to search for all the submitted forms in their department (IT, Finance etc...), however not all the data is showing in the gallery. The data collected should be dated from December 2018 to the current date, but the data stops at October 2019 instead.

 

I think this is due to the radio button I added to the screen. The radio button should enable the admins to filter the gallery data depending on form status. See below formula: 

 

SortByColumns(If(Radio1_1.SelectedText.Value="All",'IT Forms',Radio1_1.SelectedText.Value="Approved Status",Search('IT Forms',"Approved","Status"),Radio1_1.SelectedText.Value="Rejected Status",Search('IT Forms',"Rejected","Status"),Radio1_1.SelectedText.Value="Form Number",Filter('IT Forms',ID=IDInputText_1.Text),Radio1_1.SelectedText.Value="Awaiting Approval Status",Search('IT Forms',"Awaiting","Status"),Radio1_1.SelectedText.Value="Form Type",Filter('IT Forms',Title=ITFormType.Selected.Result)),"Created",Descending)

 

But as stated above, not all the data is being collected. Although I have found that up-to-date data is collected when I bypass the radio button and use the below formula: 

SortByColumns('IT Forms',"Created",Descending)

 

I can use this as a work around for now, but I will need to add the radio button back onto the screen as soon as possible. I have increased the Data Row Limit in Settings from 500 to 2000, but it hasn't made a difference - so now I have ran out of ideas to resolve this. 

 

Any help or suggestions will be greatly appreciated.

 

(Screen shots of the gallery results should be attached.)

 

 
4 REPLIES 4
mdevaney
Super User
Super User

@Axis_ER2019 

The main reason you are throwing a delegation error is because SEARCH is used in your formula.  SEARCH cannot be delegated in SharePoint.  That being said I am not entirely clear why using SEARCH would be necessary in your code because user input is being restricted to the choices in the radio buttons.  Let me know if there is a specific reason.

 

I think your code could be simplified and avoid SEARCH like this.

SortByColumns(
    Filter(
        'IT Forms',
        Status = Radio1_1.SelectedText.Value,
        Title=ITFormType.Selected.Result
     ),
    "Created",
    Descending    
)
    

 

Please let me know if this code behaves as intended within your app or if it is still throwing a delegation error.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

v-monli-msft
Community Support
Community Support

Hi @Axis_ER2019 ,

 

What are the involved columns' column types?

 

Regards,

Mona

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

Hi @mdevaney 

 

Thanks for the reply. I tried the code you suggested and unfortunately there is still a delegation error, the data is not up-to-date as it should be. 

 

It seems like the gallery doesn't like any code other than the simple: 

SortByColumns('IT Forms',"Created",
Descending
)

 

Hi @v-monli-msft ,

 

The columns for the Sharepoint list? 

 

The column "Created" which the SortByColumn is sorting is a Date and Time column type.

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.

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.

Users online (4,768)