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

Re: Filter Gallery by current user Dynamics 365 Canvas App

Hi @v-xida-msft 

 

Unfortunatley, both formulas do not work. I also tried the formula with option sets but had same results.

 

Formula 1 gives an error on Status = Status.Open - Name isn't valid. This identifier isn't recognized.

Formula 2 gives 6 errors with similar descriptions asshown below:



Issue:

Invalid argument type.

Location:

BroweGallery1.Items

 

Status field datatype on CDS is an Option Set.

 

image.png

 

Is there any possibility to bring in advanced find views from CDS to the Canvas app as a work around? I attended a webinar a couple of weeks ago in which they said that it is possible. 

 

Community Support Team
Community Support Team

Re: Filter Gallery by current user Dynamics 365 Canvas App

Hi @Anonymous ,

Currently, I could not reproduce your issue on my side.

 

Please consider modify your formula as below:

SortByColumns(
              Search(
                     Filter(
                            Leads,
                            If(
                               Dropdown1.SelectedText.Value="Open Leads",
                               Status = [@Status].Open,
                               Dropdown1.SelectedText.Value="Disqualified Leads",
                               Status= [@Status].Disqualified,
                               Dropdown1.SelectedText.Value="All Leads",
                               Status= [@Status].Open || Status= [@Status].Disqualified || Status = [@Status].Qualified, 
                               Dropdown1.SelectedText.Value = "My Open Leads",
                               Status = [@Status].Open && AsType(Owner, [@Users]).'Full Name' = User().FullName
                             )
                     ),
                     TextSearchBox1.Text,
                     "subject", "fullname"
             ),
             "subject",
              If(SortDescending1,Descending,Ascending)
)

Please try above formula, check if the issue is solved.

 

If the issue still exists, please consider re-generate a new app based on your CDS Entities, and add User Entity within this new created app, try above solution, check if the issue has been fixed.

 

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.
Anonymous
Not applicable

Re: Filter Gallery by current user Dynamics 365 Canvas App

Hi @v-xida-msft 

 

I am still struggling with the formula. I have created a new app through CDS with Sandbox enviornment. The following formula is showing 19 errors including [@Status] is not valid, The identifier is not recognized.

SortByColumns( Search( Filter( Leads, If( Dropdown1.SelectedText.Value="Open Leads", Status = [@Status].Open, Dropdown1.SelectedText.Value="Disqualified Leads", Status= [@Status].Disqualified, Dropdown1.SelectedText.Value="All Leads", Status= [@Status].Open || Status= [@Status].Disqualified || Status = [@Status].Qualified, Dropdown1.SelectedText.Value = "My Open Leads", Status = [@Status].Open && AsType(Owner, [@Users]).'Full Name' = User().FullName ) ), TextSearchBox1.Text, "subject", "fullname" ), "subject", If(SortDescending1,Descending,Ascending) )

 

This following formula has only 6 errors which is showing invalid argument type as mentioned in previous comment.

SortByColumns( Search( Filter( Leads, If( Dropdown1.SelectedText.Value="Open Leads", 'Status (Leads)' = 'Status (Leads)'.Open, Dropdown1.SelectedText.Value="Disqualified Leads", 'Status (Leads)'= 'Status (Leads)'.Disqualified, Dropdown1.SelectedText.Value="All Leads", 'Status (Leads)'= 'Status (Leads)'.Open || 'Status (Leads)'= 'Status (Leads)'.Disqualified ||'Status (Leads)' = 'Status (Leads)'.Qualified, Dropdown1.SelectedText.Value = "My Open Leads", 'Status (Leads)' ='Status (Leads)'.Open && AsType(Owner, [@Users]).'Full Name' = User().FullName ) ), TextSearchBox1.Text, "subject", "fullname" ), "subject", If(SortDescending1,Descending,Ascending) )

 

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,531)