cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrleetyler
Resolver II
Resolver II

Filter SP list via Power Apps variables

hi all,

I have a PA flow triggering from a PowerApp. 

 

I am trying to run a "Get Items" on my Sharepoint list to filter between 2 dates with the date parameters being entered via SP Date pickers.

 

Note: If i just do "Created ge <Entry 1>" ....it works fine ...however adding the "and....." it breaks and gives me a "String was not recognized as a valid DateTime." error. 

 

PA filter box

DatefilterPA.png

 

PowerApp breakdown.

DatefilterPA2.png

 

 

anyone know how to fix this?

 

 

note: Figured out the End Date doesn't work even when isolated? so guessing it's trying to read it as a specific date format? where are the start date could be any format DD/MM or MM/DD?

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @mrleetyler ,

 

I did a test for you but I did not encounter this error.

vxiaochenmsft_0-1630291694076.png

Created ge '@{triggerBody()['Getitems_FilterQuery']}' and Created le '@{triggerBody()['Getitems_FilterQuery_1']}'

 

vxiaochenmsft_1-1630291714742.png

vxiaochenmsft_2-1630291733051.png

vxiaochenmsft_3-1630291756107.png

vxiaochenmsft_4-1630291802685.png

 

Please try to remove the flow in your canvas and add it again to check if the error disappears.

vxiaochenmsft_5-1630291883097.png

 

If the problem persists, please try the 'Filter array' action.

vxiaochenmsft_6-1630291966175.png

 

Best Regards,

Wearsky

 

View solution in original post

3 REPLIES 3
v-xiaochen-msft
Community Support
Community Support

Hi @mrleetyler ,

 

I did a test for you but I did not encounter this error.

vxiaochenmsft_0-1630291694076.png

Created ge '@{triggerBody()['Getitems_FilterQuery']}' and Created le '@{triggerBody()['Getitems_FilterQuery_1']}'

 

vxiaochenmsft_1-1630291714742.png

vxiaochenmsft_2-1630291733051.png

vxiaochenmsft_3-1630291756107.png

vxiaochenmsft_4-1630291802685.png

 

Please try to remove the flow in your canvas and add it again to check if the error disappears.

vxiaochenmsft_5-1630291883097.png

 

If the problem persists, please try the 'Filter array' action.

vxiaochenmsft_6-1630291966175.png

 

Best Regards,

Wearsky

 

thanks Wearsky,

 

through experimenting realised it wasn't like sending the date format DD/MM/YYYY like we would use in Australia. i forced it to change to US format before sending and it seems ok now. 

 

luckily straight forward fix but that caught me out for a long time.

 

that explains why my start date was working and end date which was after the 12th didn't work

v-xiaochen-msft
Community Support
Community Support

Hi @mrleetyler ,

 

Glad to see you solved the problem.

This is indeed a problem in flow. I missed it.

I think there is another way to solve it that you also could use formatDateTime() function in flow to solve the problem.

formatDateTime('your date', 'MM-dd-yyyy')

 

Best Regards,

Wearsky

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,941)