I am trying to replicate the following condition set below. This would be easy in SQL, however my condition task doesn't seem to be working as expected (or my understanding is not correct.)
If statuscode not equal to 1 AND entityname NOT IN (GlobalOptionsetMetadata,
StateMetadata, StatusMetadata, TargetMetadata, OptionsetMetadata)
OR
div(sub(ticks(utcNow()), ticks(triggerOutputs()?['body/modifiedon'])), 600000000) < 30 AND (entityname IN (bankaccounttrans, dimensionattributevaluecombination etc. AND entityname NOT IN GlobalOptionsetMetadata, StateMetadata etc.)
however am getting emails from the not equal to tables at the bottom, where I would expect these to be excluded. What is the best way of handling these type of conditions?
I think this is going to do what I want. Testing is working so far. Please confirm if you agree.
(body/statuscode is not equal to 1
AND
createArray('GlobalOptionsetMetadata', 'StateMetadata', 'StatusMetadata', 'TargetMetadata', 'OptionsetMetadata') does not contain body/entityname)
OR
(div(sub(ticks(utcNow()), ticks(triggerOutputs()?['body/modifiedon'])), 600000000) < 30 AND createArray('bankaccounttable', 'bankaccounttrans', 'dimensionattributevaluecombination', 'dimensionattributevaluegroupcombination', 'dimensionattributelevelvalue', 'generaljournalaccountentry', 'ledgerjournaltrans','vendtrans') contains body/entityname)