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.
Solved! Go to Solution.
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')}
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')}'
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.
Hi @Kosenurm,
Can you share a screenshot of your list rows action configuration?
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')}
User | Count |
---|---|
88 | |
43 | |
21 | |
18 | |
16 |
User | Count |
---|---|
132 | |
47 | |
42 | |
36 | |
28 |