formatDateTime(xpath(outputs('XMLRegulations'),concat('//Array[ID/text()="', item()['ID'],'"]/EndDate/text()'))?[0],'d','en-US')
This is being done in a select statement with mapping to create a variable.
That works if there's a value, but if there's no value I get an error, because it's trying to do a formatDateTime on null and barks at that.
So how would I add a conditional piece to it...concisely.
If null then this works..
xpath(outputs('XMLRegulations'),concat('//Array[ID/text()="', item()['ID'],'"]/EndDate/text()'))?[0]
Just not sure how to wrap this.