cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tianaranjo
Level 8

Re: 500 item limit in CDM entity search filter(need to switch to asp.net app if this exists for long

@Meneghino

 

Thank you!  I am going to try now.  Would the SharePoint  DateYear Calculated column be returned as text?

 

tianaranjo
Level 8

Re: 500 item limit in CDM entity search filter(need to switch to asp.net app if this exists for long

@Meneghino

 

Meneghino - no luck with the filtering.  I have tried both code samples you provided.

Any other thoughts?

Meneghino
Level 10

Re: 500 item limit in CDM entity search filter(need to switch to asp.net app if this exists for long

DateYear should be returned as a number otherwise you cannot make mathematical comparisons.

tianaranjo
Level 8

Re: 500 item limit in CDM entity search filter(need to switch to asp.net app if this exists for long

@Meneghino

I am just getting back to this.  Either way that I try produce the delegable error - am I missing something?  The blue 'highlighted' parts the first DateYear, the || and the last =

 

 

ClearCollect(colYearFilter,
Filter('CC - Incident Reports', DateYear=CurrentYear || DateYear = CurrentYear-1))

Meneghino
Level 10

Re: 500 item limit in CDM entity search filter(need to switch to asp.net app if this exists for long

Hi @tianaranjo

Once again, you should define DateYear as a number column, not text

tianaranjo
Level 8

Re: 500 item limit in CDM entity search filter(need to switch to asp.net app if this exists for long

@Meneghino

Thanks again; I do have the SP column set up as a number field.  I was able to resolve with the following:

ClearCollect(colAllEvents,
Filter(colAllEvents, Value(DateYear)=Year(Today()) || Value(DateYear)=Year(Today())-5))

 

I appreciate your replies!

Meneghino
Level 10

Re: 500 item limit in CDM entity search filter(need to switch to asp.net app if this exists for long

Hi @tianaranjo

Glad you got it resolved.

However, the fact that using Value() you resolve the issue demonstrates that DateYear is text and not a number.

You can see this in your own screenshot, where the SharePoint calculated column's return data type is selected as "Single line of text' and not 'Number'   You need to select 'Number' and refresh the data source.

 

Highlighted
jesenavaranjan
Level: Powered On

Re: 500 item limit in CDM entity search filter(need to switch to asp.net app if this exists for long

Hi!


I'm trying to implement this;

 

I am getting an error on the UpdateContext (cannot be applied to global variables?)

& How do I create a Hundred Chart?

 

I am working with SQL data

 

Please and thankyou

J



P.s this is my code so far

pdateContext({firstrecord: First('[dbo].[tbMilestone]')});
UpdateContext({lastrecord: First(Sort('[dbo].[tbMilestone]',MilestoneID,Descending))});
UpdateContext({maxiter: RoundUp((lastrecord.MilestoneID-firstrecord.MilestoneID)/500,0)});
ClearCollect(iter,
 AddColumns(AddColumns(Filter(HundredChart,Number<=maxiter),"min",(Number-1)*500),"max",Number*500)
);
Clear(datasource_temp);
ForAll(iter,
 Collect(datasource_temp,
  Filter('[dbo].[tbMilestone]',MilestoneID>=firstrecord.MilestoneID+min && MilestoneID<firstrecord.MilestoneID+max)
 )
)
GrischkePro
Level: Powered On

Re: 500 item limit in CDM entity search filter(need to switch to asp.net app if this exists for long


@jesenavaranjan wrote:

Hi!


I'm trying to implement this;

 

I am getting an error on the UpdateContext (cannot be applied to global variables?)


My understanding is that you must apply to code to i.e., a button OnSelect - it won't work in App.OnStart. At least it didn't me.

 

@mr-dang 



I have another issue however.

 

I get 'invaid invocation' error with

UpdateContext({maxiter: RoundUp((lastrecord.MilestoneID-firstrecord.MilestoneID)/500,0)});

So I tried replacing it with: (assuming RecordID in my case is the ID number in my SharePoint list?)

Set(varMaxiter,RoundUp((lastrecord.ID - firstrecord.ID) / 100,0));

and I'm not sure if this is correct, because I am now stuck with another error:

Clear(datasource_temp);

What is datasource temp? What am I missing? Or is this one of the things I ignore as it gets creater later in the code?

abd3127
Level 8

Re: 500 item limit in CDM entity search filter(need to switch to asp.net app if this exists for long

Hi @mr-dang 

I am using the methods you provided on Sharepoint database.

But i can only retrieve first 2000 rows only.

It shows delegation warning on RecordID and && functions.

Filter(datasource,RecordId>=firstrecord.RecordId+min && RecordId<firstrecord.RecordId+max)

 Can you help me resolve this. It will be great help.

Thanks

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 500 members 4,599 guests
Recent signins:
Please welcome our newest community members: