cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
asd2525
Helper I
Helper I

SharePoint Get Items filter pulling incomplete data

Hi All,

 

I could not see a post that references this issue. I am using the Get Items action to get items from a SharePoint list.  When I put in this filter and get 43 results

 
(First_x0020_Approval_x0020_Body eq 'WFP Executive Committee') and ((startswith(Date_x0020_Entered_x0020_into_x0, '@{body('Convert_time_zone')}')) or (First_x0020_Approval_x0020_Statu eq 'Waiting for Info'))
 
but when I take out the first line I get 15 with this filter
 
((startswith(Date_x0020_Entered_x0020_into_x0, '@{body('Convert_time_zone')}')) or (First_x0020_Approval_x0020_Statu eq 'Waiting for Info'))
 
All I am doing is removing the first filter which should result in more items not less. (FYI I have a starts with function because the person who originally created the list made the column a string and not date and people won't let me change it now because data might be lost)
Has anyone ever come across this issue before? Any help would be very appreciated! Thanks!
1 ACCEPTED SOLUTION

Accepted Solutions
asd2525
Helper I
Helper I

So, I was not able to get the filter to work like it should, and I still think it is a bug in the system, but I did figure out a workaround. The work around is actually in my previous post. Instead of trying to get the items with a single get items step I split it into 2 steps. I have a get items with the first filter then add those rows to the excel and then with the second get items I use the second filter and add those rows to the excel. It makes it take a little bit longer and requires more actions than it needs to but it get the job done.

View solution in original post

3 REPLIES 3
jinivthakkar
Memorable Member
Memorable Member

@asd2525 I think there is some issue with your query:

 

Please try this query 

 

(startswith(Date_x0020_Entered_x0020_into_x0, '#valuehere#') or First_x0020_Approval_x0020_Statu eq '#valuehere#')

 

I tried a similar thing at my end and it works fine:

jinivthakkar_0-1615216970855.png

jinivthakkar_1-1615216996495.png

Output is :

jinivthakkar_2-1615217063568.png

 

Hope this helps.

 

--------------------------------------------------------------------------------

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.

 

 

 

 

Thank you for the advice. I tried what you had and still was not able to get it to work. I started the flow from scratch and did 3 get items that are all coming from the same source. I then put in a compose after each one to count how many items the previous action got. The 3 equations I used in the different get items actions are:

 

First_x0020_Approval_x0020_Statu eq 'Waiting for Info'

Created ge '2021-03-08'

(First_x0020_Approval_x0020_Statu eq 'Waiting for Info') or (Created ge '2021-03-08')

 

I switched to using the Created column as it is in date format and it removes the possibility of string vs date errors. Also, none of the items that are Waiting for Info have a created date of 03/08/2021. As you can see in the attached images the first equation pulled 17 items, the second pulled 8 and the last only pulled 15. So not only did the last equation not pull a total of 25 items like it should have ( 17 + 8 ) but it also only pulled 15 of the 17 items from the first equation and none from the second. I cannot wrap my head around this. It makes no sense. This is incredibly frustrating as this is the only step that is left for this flow to be completed. Any additional help or suggestions would be appreciated. Thanks.

 

asd2525_1-1615238167945.png

 

 

asd2525_2-1615238203163.png

 

asd2525_3-1615238240060.png

 

asd2525
Helper I
Helper I

So, I was not able to get the filter to work like it should, and I still think it is a bug in the system, but I did figure out a workaround. The work around is actually in my previous post. Instead of trying to get the items with a single get items step I split it into 2 steps. I have a get items with the first filter then add those rows to the excel and then with the second get items I use the second filter and add those rows to the excel. It makes it take a little bit longer and requires more actions than it needs to but it get the job done.

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (19,176)