cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kosenurm
Super User
Super User

UtcNow plus 1 day in List Rows Dataverse action

Hi there,

 

I am building a deskbooking app, and am working on a Virtual Agent to help with this. 

 

As part of the flow, I need to list Dataverse rows which meet certain criteria to ensure that there is no double booking. 

 

In the List Rows action, I am putting this as Filter rows (as an expression) to try to list only those where there is a reservation date of tomorrow. The column in Dataverse is "Date Only"

 

new_reservationdate eq 'formatDateTime(utcNow(), 'dd-mm-yyyy', 1)'

 

When I run this, however, I get this error message - Unable to process template language expressions in action 'List_rows' inputs at line '0' and column '0': 'The template language function 'formatDateTime' expects its third parameter to be of type string. The provided value is of type 'Integer'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.

 

What am I doing wrong?

 

Thanks

K.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Kosenurm,

 

Based on what I have found in this thread I would say to try the same filter rows value without quotes around the expression.

 

Edit: I was able to reproduce that same error. I also had to update to the correct format (yyyy-MM-dd). In my dev environment this worked:

 

new_bexdeskreservationdate eq @{formatDateTime(addDays(utcNow(), 1), 'yyyy-MM-dd')}

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

5 REPLIES 5
Expiscornovus
Super User
Super User

Hi @Kosenurm,

 

When you want to add 1 day you could use the adddays function. Try this instead:

 

new_reservationdate eq '@{formatDateTime(addDays(utcNow(), 1), 'dd-MM-yyyy')}'

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Thanks, when I tried this... I get this error

 

A binary operator with incompatible types was detected. Found operand types 'Edm.Date' and 'Edm.String' for operator kind 'Equal'.

 

Any ideas?

Thanks

K.

Expiscornovus
Super User
Super User

Hi @Kosenurm,

 

Can you share a screenshot of your list rows action configuration?



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Capture.PNG

Expiscornovus
Super User
Super User

Hi @Kosenurm,

 

Based on what I have found in this thread I would say to try the same filter rows value without quotes around the expression.

 

Edit: I was able to reproduce that same error. I also had to update to the correct format (yyyy-MM-dd). In my dev environment this worked:

 

new_bexdeskreservationdate eq @{formatDateTime(addDays(utcNow(), 1), 'yyyy-MM-dd')}

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


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.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,327)