The following line of code is failing to select the target record:
selectrelated "Contacts Database","key",{«Contact ID»},"sourcekey",{«Contact ID»}
Instead of using the specified key and source key, the statement is selecting the records based on the main key defined in the Relations Panel, so the override for the key is not working.
For reference, the key override is working as expected with the Join statement.
join "Contacts Database","key",{«Contact ID»},"sourcekey",{«Contact ID»}
Am I missing something?