cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User
Super User

Re: Gallery Data Not Current

@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."

Highlighted
Community Support
Community Support

Re: Gallery Data Not Current

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.
Highlighted
Frequent Visitor

Re: Gallery Data Not Current

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
)

 

Highlighted
Frequent Visitor

Re: Gallery Data Not Current

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
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 (7,090)