cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nicccholas
Frequent Visitor

Filtering Array Error

There is an error when filtering the array fetched in Excel.

 

The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.

 

There are both Date and Text (e.g. Expired) in the same column - Expiration Date.

May I ask if it is possible to achieve the below statement in anyway ?

(Checking the record that is already expired or 60 days before the expiry date as well as column with "Expired"

 

@or(lessOrEquals(formatDateTime(addDays('1899-12-31', int(item()?['Mobile Plan Expired Date'])), 'yyyy-MM-dd'), formatDateTime(addDays(utcNow(), 31), 'yyyy-MM-dd')),contains(item()?['Mobile Plan Expired Date'], 'Expired'))

 

 

ContractExpiration DateExpected Result
A2018-01-01Yes
B2021-05-30Yes
CExpiredYes
D2021-09-30No
1 ACCEPTED SOLUTION

Accepted Solutions
PrasadAthalye
Super User
Super User

Can you check if column contains word 'Expired'? If not, format it to date? Something like below where I am checking if variable equals Expired?

 

if(equals(variables('test'), 'Expired'), 'Expired', formatDateTime(addDays(utcNow(), 31), 'yyyy-MM-dd'))
Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

1 REPLY 1
PrasadAthalye
Super User
Super User

Can you check if column contains word 'Expired'? If not, format it to date? Something like below where I am checking if variable equals Expired?

 

if(equals(variables('test'), 'Expired'), 'Expired', formatDateTime(addDays(utcNow(), 31), 'yyyy-MM-dd'))
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 (28,598)