Two columns in one or one column dynamically renamed

Hi I need some help in my work sometimes it happens to have to replicate some parts of wkf I was thinking about some components made as Templates, I need a hand, as you can see in the image my problem is that in the table part the field to search is sometimes on two columns and sometimes on just one and they never have the same column name. I’ll give you an example sometimes I have two columns with the following names FISCALECODE and PARTITAIVACODE other times CODICEFISCALE and PARTITAIVA and usually either they are both valued in the same way or sometimes one is valued and the other is null while when there is it on only one maybe I only know CODICEFISCALE. My question is is there a way with some node inside the component to be able to join them into a single one with another name when there are two and when there is one make a copy and make everything unique?

Thank you