Can I use calculated field in dataflow to check for future date within array and update it to current date?
I have a dataflow that was created a few months ago to ingest financial accounts data via batch ingestion. The account data is an array of various account fields (ie. account number, product, balance, etc). One of the fields in the array is a date indicating the last ACH deposit transaction date for funds deposited into the account. We recently found out that some of these dates can be future dates when is creating issues for journeys developed in AJO that leverage this date field. Is it possible to create a calculated field that checks every account being processed in the array accounts[*].lastTDHDirctDepositDate for a future date and replace it with a static date value of "0001-01-01". If the date isn't a future date then retain the value coming in from the source data. We can then map this calculated field to the field in the XDM schema thus ensuring we don't have future dates?
I was trying to use iif function
iif(accounts[*].lastTDHDirctDepositDate > now(), "0001-01-01", accounts[*].lastTDHDirctDepositDate) but it seems I'm getting an error with the bracket so I'm assuming the iif function is looking for the array to be flattened but I'm not sure.
I'm hoping someone here can assist?
Thanks