cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tlevine
Kudo Kingpin
Kudo Kingpin

Filter Get Items with O Data

Hi Community - 

 

I am having some issues when trying to filter my Get Items step. I am storing data in a Sharepoint List which is populated with submissions from PowerApps. The data is stored in a field called "Submitted Date" in the Sharepoint List as a Single line of text. Examples of the data would include 9/28/2020, 10/1/2020. I am looking to filter the Get Items step to capture any requests that happen within a specific week. At that point, I can take the data and send it to my team in an email (I have this part figured out).

 

I am not sure if this is impacting the current situation but no dynamic content is available when trying to filter. In the past, I have been able to filter using something along the lines of 'Title' eq "Dynamic Content Field". Also, unclear if the data being stored as text is a major issue here.

 

Thanks all for the support in advance.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Amanthaper
Responsive Resident
Responsive Resident

That syntax looks wrong. It should be:

PWD ge '2020-10-05T01:55:09.5913172Z' and PWD le '2020-10-12T01:55:09.6381941Z'

Please remove the ' from both PWD

View solution in original post

9 REPLIES 9
v-alzhan-msft
Community Support
Community Support

Hi @tlevine ,

 

Could you please share the screenshot of the configuration of your flow?

What the special week that you mentioned? 

 

You could take a try to refer to screenshot below to create the flow:

1.png

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

thanks for the quick reply, @v-alzhan-msft - how can i ensure that the date is dynamic? the code that i use in powerapps to find the Monday of the current week is Today() - Weekday(Today(), MondayZero). I then use Today() + 7 - Weekday(Today(), MondayZero) to determine the Monday of the following week. basically, this is what i want to do in order to establish my range for the filter

Amanthaper
Responsive Resident
Responsive Resident

Hi,

You can use these 2 functions to get:

1. Monday this week:

adddays(utcNow(),mul(sub(int(dayOfWeek(utcNow())),1),-1))
2. Monday next week:
adddays(utcNow(),sub(8,int(dayOfWeek(utcNow()))))

 

This gets:

PA_UG_Mondaydatefun1.png

Then do either:

PA_UG_Mondaydatefun2.png

PA_UG_Mondaydatefun3.png

Or to jump ahead 7 days from the current day use adddays(utcNow(),7)

 

Hope this helps,

Aman T

------------------------------------------------------------------------------------------------------
If my post helps you with your problem or answers your question, please mark it Solved or Answered. This helps anyone with similar challenges. If you like my response, please give it a Thumbs Up.
------------------------------------------------------------------------------------------------------

Hi @Amanthaper  - thank you for the suggestion, i see that my variables work properly and assign the correct dates to them. however, the flow still fails when trying to execute the query. could this be due to my field called 'PWD' (this field contains the dates) is stored as text in my sharepoint list?

Amanthaper
Responsive Resident
Responsive Resident

What's the error? Can you share a snip of your flow?

The date format should already be text but try this with both functions: 

string(adddays(utcNow(),mul(sub(int(dayOfWeek(utcNow())),1),-1)))

hi @Amanthaper  - this is the error I am currently receiving

 

Screen Shot 2020-10-03 at 9.47.11 PM.png

i will try to update my variables using the next format you provided, will advise on results

 

It looks like the dates are being recognized properly with each variable.

 

Screen Shot 2020-10-03 at 9.55.47 PM.png

This is the filter query result with the error I receive from Get Items:

 

PWD' ge '2020-10-05T01:55:09.5913172Z' and 'PWD' le '2020-10-12T01:55:09.6381941Z'

Amanthaper
Responsive Resident
Responsive Resident

That syntax looks wrong. It should be:

PWD ge '2020-10-05T01:55:09.5913172Z' and PWD le '2020-10-12T01:55:09.6381941Z'

Please remove the ' from both PWD

Thank you for your help in finding the solution. @Amanthaper 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,258)