admin管理员组

文章数量:1317898

I have a flow that is working with multiple 'formatdatetime(triggerOutputs()' when they are ALL filled out on the Plumsail form, but when I don't fill in one date the flow fails to work and I receive this message:

InvalidTemplate. Unable to process template language expressions in action 'Start_document_generation_process_with_json' inputs at line '0' and column '0': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'.

The expression I am using is:

formatDateTime(triggerOutputs()?['body/EOWD'],'D')


image description

I have tried using: coalesce(formatDateTime(triggerOutputs()?['body/EOWD'],'D'), '') but I am not sure if I have inserted it correctly

I have also tried using: if(equals(triggerOutputs()?['body/EOWD'], null), formatDateTime(triggerOutputs()?['body/EOWD'],'D'))

But I receive the following message:

InvalidTemplate. Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language function 'if' expects three parameter: the condition to test as the first parameter, the value to return if the condition is true as the second parameter, and the value to return if the condition is false as the third parameter. The function was invoked with '2' parameter(s).

I would really appreciate any help on this as i've been working on it for weeks!

Thanks

I have a flow that is working with multiple 'formatdatetime(triggerOutputs()' when they are ALL filled out on the Plumsail form, but when I don't fill in one date the flow fails to work and I receive this message:

InvalidTemplate. Unable to process template language expressions in action 'Start_document_generation_process_with_json' inputs at line '0' and column '0': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'.

The expression I am using is:

formatDateTime(triggerOutputs()?['body/EOWD'],'D')


image description

I have tried using: coalesce(formatDateTime(triggerOutputs()?['body/EOWD'],'D'), '') but I am not sure if I have inserted it correctly

I have also tried using: if(equals(triggerOutputs()?['body/EOWD'], null), formatDateTime(triggerOutputs()?['body/EOWD'],'D'))

But I receive the following message:

InvalidTemplate. Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language function 'if' expects three parameter: the condition to test as the first parameter, the value to return if the condition is true as the second parameter, and the value to return if the condition is false as the third parameter. The function was invoked with '2' parameter(s).

I would really appreciate any help on this as i've been working on it for weeks!

Thanks

Share Improve this question asked Jan 22 at 15:43 Jonathan HughesJonathan Hughes 1 2
  • If triggerOutputs()?['body/EOWD'] is null, what do you want to replace it with? Just an empty string? I want to be clear on that. – Skin Commented Jan 22 at 19:55
  • Yes an empty string is what I am looking for as the flow fails with that expression I am using at the moment. – Jonathan Hughes Commented Jan 23 at 9:02
Add a comment  | 

1 Answer 1

Reset to default 0
if(equals(coalesce(triggerOutputs()?['body/EOWD'], ''), ''), '', formatDateTime(triggerOutputs()?['body/EOWD'], 'D'))

... written from my phone so untested.

本文标签: power automateMultiple formatdatetime(triggerOutputs() Not WorkingStack Overflow