Hi there, notice the concat function will only work in the context of the GUI. If you are working in the script you can concatenate the values as follows:
@1 & '-' & @2 as KeyField
However, I would suggest to use some of the autonumber flavors in order to have the ID's represented as integers instead of linking through text values.
autonumber(@1 & '-' & @2) as KeyField
You can also use:
autonumberhash256(@1 , @2) as KeyField