cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bansay
Level: Powered On

DetailForm error with datasource

Hello; 

 

I have a error when i use this code for sort my BrowseGallery : 

My DetailForm display => invalid formula. A value compatible with "datasource" is expected


My list BrowseGallery ('Home Working Test') is a datasource from a SharePoint List

 

 

If(
     UserEmail in UserAdmin.Value;
     SortByColumns(
          AddColumns(
               Filter(
                    'Home Working Test';
                    StartsWith(
                         Requester.DisplayName;
                         TextSearchBox1.Text
                    )
               );
               "itemchoice";
               If(
                    Status_Request.Value = "Requested";
                    "A"
               )
          );
          "itemchoice";
          "Ascending";
          "Title";
          If(
               SortDescending1;
               Descending;
               Ascending
          )
     );
     SortByColumns(
          AddColumns(
               Filter(
                    'Home Working Test';
                    Requester.Email = UserEmail;
                    StartsWith(
                         Requester.DisplayName;
                         TextSearchBox1.Text
                    )
               );
               "itemchoice";
               If(
                    Status_Request.Value = "Requested";
                    "A"
               )
          );
          "itemchoice";
          "Ascending";
          "Title";
          If(
               SortDescending1;
               Descending;
               Ascending
          )
     )
)

 

 

Thanks for help ! 🙂 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: DetailForm error with datasource

Hi @bansay ,

I found that you haved posted same issue within this forum already, please check my response within the following thread:

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Error-DetailForm-with-BrowseGallery-...

 

Please take a try with the solution I mentioned in above thread, check if the issue is solved.  If this issue is solved, please go ahead to click "Accept as Solution" to identify this thread has been 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.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: DetailForm error with datasource

The AddColumns() is causing the issue. It creates a temporary table that is used in the gallery. So gallery.Selected points to a row on the temporary table and not a record in the 'Home Working Test' data source. In your case you may not need AddColumns() because you could just add a label to the gallery that displays  "A" if thisitem.Status_Request.Value = "Requested".



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: DetailForm error with datasource

Hi @bansay ,

I found that you haved posted same issue within this forum already, please check my response within the following thread:

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Error-DetailForm-with-BrowseGallery-...

 

Please take a try with the solution I mentioned in above thread, check if the issue is solved.  If this issue is solved, please go ahead to click "Accept as Solution" to identify this thread has been 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.

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,183)