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

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 395 members 5,767 guests
Please welcome our newest community members: