cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
susannarae
Helper II
Helper II

Scheduled Flow: check SP item date, if today, check second list for existing item, if none add item to second list

Hi all,

I want to create a Scheduled Flow that runs once a day and checks a SP list titled '21-22 CLC Enrollment' for two specific columns: 'Start Date' and 'Class Switch Date,' starting with 'Start Date.' If the 'Start Date' is not today, I want the Flow to then check the date in the 'Class Switch Date.' If either column has today's date, I want the Flow to then check a second SP list called '21-22 ClassRoster' for an existing item (The column 'Child ID' is the same unique number for both lists). If an item exists, update it, if it doesn't exist, create a new item.

 

I started my attempted build based off of previous forum posts and walkthroughs, however when I ran a test to see if a list item with today's date in 'Start Date' would be added, it didn't work, even though the Test was marked as completed. Because of this, I didn't start on the 'Class Switch Date' side; figured it'd be better to get feedback now and hopefully save myself a headache and some time. Photos of what I've got so far are below.

 

As an aside, I did attempted to use Filter Query instead of a Condition for my first 'Get Items,' but for whatever reason the formula refused to work. Not sure what's going on there as I've used a similar formula in other Flows without issues.

 

And and all help/feedback would be greatly appreciated; thank you in advance!

 

Flow 1.png

 

Flow 2.png

 

Flow 3.png

 

Flow 4.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

ok. Since you have special characters in your column name, it is failing. Try following ...

 

All_x002d_S4_x003a_StartDate eq '04/08/2021'

 

If this does not work, go to list settings and click on the column. Then pick up the Internal Column name from URL like below...

 

PrasadAthalye_0-1617913143492.png

 

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

5 REPLIES 5
PrasadAthalye
Super User
Super User

You can use a Filter query for the start date like below... Please note single quotes before and after the format function...

 

formatDateTime(utcNow(), 'MM/dd/yyyy')

 

PrasadAthalye_0-1617836511622.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Unfortunately this did not work. The flow failed, and the error details are as follows:
"The expression "All-S4: Start Date eq '04/08/2021" is not valid. Creating query failed.
clientRequestId: f8478818-6480-4e91-ac82-38361284cd0e
serviceRequestId: f8478818-6480-4e91-ac82-38361284cd0e"

I encountered this error many times previously with this Flow, which is why I'd switched to Conditions. Not sure why it doesn't seem to like Filter Query though. Any ideas?

Is your column name All-S4: Start Date OR is it just Start Date?

 

Also, I see that the ending single quote is missing after 2021.

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

The column name in full is 'All-S4: Start Date.' I am not sure why the formula rejection does not have the ending single quotation mark, as I typed it in exactly as you had written it. Just in case, I did re-input the formula and ran another test, and it did fail again. Here is the second set of Error Details (at least this time around it registered the ending single quotation): 

The expression "All-S4: Start Date eq '04/08/2021'" is not valid. Creating query failed.
clientRequestId: ba5f44e0-a708-461b-94b1-8efd9f4b5ab3
serviceRequestId: ba5f44e0-a708-461b-94b1-8efd9f4b5ab3

ok. Since you have special characters in your column name, it is failing. Try following ...

 

All_x002d_S4_x003a_StartDate eq '04/08/2021'

 

If this does not work, go to list settings and click on the column. Then pick up the Internal Column name from URL like below...

 

PrasadAthalye_0-1617913143492.png

 

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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 on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (12,597)