Hi,
I don't have a column named 'ParentTerritory1Id__c' but I tried another sales force field (AccountNumber)
try to add this on that Column: if(equals(item()?['AccountNumber'],null ),'',concat('XXX',item()?['AccountNumber']))
on your case
try to add this on that Column: if(equals(item()?['ParentTerritory1Id__c'],null ),'',concat('XXX',item()?['ParentTerritory1Id__c']))
for XXX just use a logic app variable
is this what you want to acomplish?