I want to know how to do the following if is possible with a upsert in order to avoid a lot of code:
The logic is the following,
function get two values for X and