cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Monfry
New Member

Flow - Help us :(

Dear all,

we are really frustrated using Flow! We are trying to create a flow that 30 days before the expiry date, send automatically an email. The column that contain the expiry date is "Scadenza revisione" (date format) in a Sharepoint list, we add this conditions in our Flow:

 

@equals(formatDateTime(item()?['Scadenza_x0020_revisione'], 'DD/MM/YYYY'), formatDateTime(addDays(utcNow(), 30), 'DD/MM/YYYY'))

 

but display this error:

 

Non è possibile elaborare le espressioni del linguaggio del modello per l'azione 'Condizione' alla riga '1' e alla colonna '2334': 'La funzione 'formatDateTime' del linguaggio del modello prevede che il primo parametro sia del tipo string, ma il valore specificato è del tipo 'Null'. Per informazioni sulla sintassi, vedere https://aka.ms/logicexpressions#formatdatetime.'.

 

Can you help us?

 

Thank you in advance,

Alessandro

2 REPLIES 2

The error message translation is somethig like this:

 

Template language expressions cannot be processed for the ' condition ' action at row ' 1 ' and column ' 2334 ': ' The ' formatDateTime ' function of the model language expects the first parameter to be of type string, but the specified value is Type ' Null '. For syntax information, see

 

The problem is that your data field is seen as empty. 

 

Can you create 2 variables and set these variables to the values of your dates. Then run the flow and see what the date is set to in the run history.

 

Then add the condition and simply use Date 1 equals Date 2. So in short take the complexitry out of your conditoon and add it to your variable assignments.

 

Then on the left hand site

v-yuazh-msft
Community Support
Community Support

Hi @ Monfry,

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

As @ Pieter_Veenstra said, the error message told that the “Scadenza revisione” field has an empty value.

You could add a condition in the flow to check if the “Scadenza revisione” field has an empty value as screenshot below:

 1.png

The expression in the first Condition as below:

@empty(triggerBody()?['Scadenza_x0020_revisione'])

 

The expression in the Condition 2 as below:

@equals(formatDateTime(triggerBody()?['Scadenza_x0020_revisione'], 'DD/MM/YYYY'), formatDateTime(addDays(utcNow(), 30), 'DD/MM/YYYY'))

 

When an item is created in the sharepoint list, and the “Scadenza revisione” field has an empty value, the flow wouldn’t send the email and the flow would run successfully as below:

2.png

When an item is created in the sharepoint list, and the “Scadenza revisione” field has an existing value of 30 days later, the flow would send the email and the flow would run successfully as below:

3.png

 

 

Regards,
Alice Zhang

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,384)