Problem with OData query in Microsoft Flow for GetItems action on a SharePoint list having 20000+ rows - sharepoint-online

I have created a Microsoft Flow (PowerAutomate), to retrieve records from a SharePoint list. The list has 22,300 records in it. I have written the below OData filter query. The column (Email) is of Person type.
Email/EMail eq 'me.someone#company.com'
But none of the records are retrieved. However, if I give the below query, the same record is retrieved.
ID eq 22102
The list contains the below records.
ID
Email
22102
Me someone
2
another person
However, if I query for the email id of the 2nd record (another.person#company.com), it is retrieved fine.
Email/EMail eq 'another.person#company.com'
I am wondering is there any limitation towards retrieving records greater than 20000? Really surprised why the second record is retrieved and not the first one? Or do I have to tweak any pagination settings?
When retrieving using ID, it works fine, while for Person, it is not. Is there any indexing I need to enable for query to work beyond 20,000?

If you are having more than 5000 items with this person/email "me.someone#company.com", filter condition will fail. This is the limitation of SharePoint and SharePoint REST APIs.
If you have less than 5000 items for this particular email/person, you can try below suggestions:
Add indexing on this person or group column
Add 5000 in Top Count in Get items action
Enable pagination from settings of Get items action and provide number of items you want to fetch.
You can fetch maximum of 100000 items using Get items action.

Related

How to filter Sharepoint list in Flow by current date plus days?

I've got a Sharepoint list tracking items and renewal dates associated with them. I want to utilize MS Flow to get just the items from that list (which will eventually have about 200 items in it) that have a renewal date 60 days from now, and send an email with the info from the list. This would recur every day.
The recurring feature works fine, as does the list and email.. My issue is with filtering the list down. I had hoped to be able to use views I created in the list, couldn't find a method for that, so I've resorted to attempting to utilize the ODATA filtering option.
I use the AddToTime feature before grabbing the list to get the 60 days out date (which is returning the correct value based on the error string), but no matter what I get invalid expression when it runs on the filter.
Any guidance on this?
This is Sharepoint Online and Flow Online. An example query string that I've used is Renewal_x0020_Date eq [insert the output from the Add to time flow item before].
RESOLVED!
Turns out, all I had to do was place single quotes around my object for the calculated date/time in my ODATA filter.

Power BI query to return same-name list results from multiple subsites

We have a SharePoint site that users will create item records as a new subsite with a template. On this template is a list, we'll call List A. There are 90+ of these subsites with the same 'List A' name.
On List A there is a "Status" field with the "Closed" choice. I am looking to make a report (preferably in Table/Excel form) that will query all the 'List A' lists that have a Status field set to 'Closed'.
I am looking at OData queries but I'm very new to Power BI. Any help would be much appreciated!
Thanks!
I would build a query based on one subsite example, using the built-in connector for a SharePoint Online List. I would apply the Status = Closed filter. Then I would replace the hard-coded Site with a Query Parameter.
Now you can right-click that Query and choose Create Function.
Next you need a Query that lists your 90+ subsites with their URL. There might be an OData query that can do this or you might need to maintain a manual list e.g. in Excel. Then you can add a Custom column that calls the Query Function (created above) and passes each subsite URL.
Expand that table-type Custom column and the result will be the filtered rows from all the subsites.

Search Filter for one level down in SuiteScript

Basically, what I need to do is get at the Billing Transactions:Internal Id field in a script for searching.
I have a saved Transaction search, where type = Purchase Order. I need to get the PO internalid AND the Billing Transaction: Internal Id. The saved search is fine.
Because in script the nlapiSearchRecord can only get one record, and I have over 9,000 rows, I am doing a loop where I am adding a filter of internalid >= the last internalId of the previous execution (1,000 rows). However, I need the filter for this search to be on the Billing Transaction:Internal Id NOT the PO Internal ID.
What "field" can I use in the nlobjSearchFilter creation to get the Billing Transaction:Internal Id?
Using the NetSuite Records Browser, if you check the Search Filters section for Purchase Orders, there is a filter there called billingtransaction that you can use. There is also a Search Column of the same name, so you can also retrieve that in your results.
Another option, if you have a saved search and are comfortable with your script executing saved searches, you can simply pass the search ID to nlapiSearchRecord or nlapiCreateSearch to execute the saved search or modify it then execute it, respectively. We typically avoid doing this in our code because any Administrator can modify a Saved Search, even Private ones, but it is an option nonetheless.

Query problem with lookup column in SharePoint

Setup:
I have two lists on a SharePoint site, A and B. List A has a column 'b' that is a lookup to the ID field of list B. I have 500k+ records in A and about 6k records in B.
What works:
I am able to execute a query for items in list A using SharePoint web services, and am even able to filter the query based on a specific "lookup" value for column 'b'. For example, I can query for items in A whose column b matches 1234 (...<Value Type="Lookup">1234</Value>...), and so on.
What doesn't work:
The query does not work for items older than a specific date, even though my query does not involve dates in any way -- only the lookup column. Any query on data newer than two years old works fine, anything older than that fails. If I view items from the SharePoint web page they appear ok, and all the links from child records in B to parent records in A work just fine -- the lookup columns appear intact.
Question:
Is there some kind of maintenance task in SharePoint that can cause some underlying data to get corrupted that can prevent a query based on a lookup id to stop working, like a system restore, etc? In other words, the lookup column data appears correct on the surface in the web browser. But does SharePoint represent this value with a GUID or other invisible data that might be out of sync or stale?
Thanks.
Maybe you are hitting another limit; the maximum number of items retrieved in a query?
See list throttling
Try querying by the ID by adding the LookupId=”TRUE” attribute to your FieldRef element.
http://abstractspaces.wordpress.com/2008/05/05/caml-query-lookup-field-by-id-not-by-value/
The problem appears to be related to the fact that the column in question was indexed. When I removed the index everything started working. When I reapplied the index, everything kept on working. I'm attributing this problem to a corrupt index.

Append Query From Access Into Linked SharePoint List with Lookup Fields in SP List

I am trying to append records in an MS Access table (I am using Access 2010, but can use 2007 if need be) into a linked SharePoint list.
There is an attachments field (when viewed from Access), but I am not concerned with appending these.
The SharePoint list has a few lookup fields, that in design view are of the Number format. Upsizing to SQL Server, I can confirm that they are numbers (and I assume the Id for the related SharePoint list object).
I copied the structure of the SharePoint list and pasted into a MS Access table, and then filled in a few sample records
I used the query wizard to select all of the fields of the Access table (minus the Access table's autonumbered ID and attachments), click "Append", and then selected the SharePoint list.
If I run this query, I get the error that X record(s) were not appended due to validation violation reasons, which is all of them. I've checked all field definitions and none are defined as required or have a validation constraint.
The only thing I can think of is that there is some issue with the Lookup fields, but each number Id I've checked is a valid Id.
I'm hoping for a MS Access solution, but if the only approach is to programmatically do it, could someone send me directions on how to get started with the SharePoint 3.0 SDK?
Thank you for your time.
Lookup columns are not number type even your parent items are of number type reason behind lookup column always attaches the item id of parent item.If you want to see the data in access kindly use the "export to Access" functionality available in datasheet view
I have linked to a SharePoint table, then appended directly to it from a query.
My issue is that this process takes a very long time to push up to SharePoint, then 2 times as long when first I need to delete the records currently in the list before appending.
Is there a better way to blow out and create the table while preserving the link since it is not an Access object?
Anyway I hope this may help you out some and get me some insight as well.
Regards.

Resources