copy paste values problem

282 viewsScripting
0

Hello,

I want to write a script that copy values from column to fill them on another column which has already some values that are filled.

I tried the CellOnly.copy() and CellOnly.paste but it did not work because the column where i want to paste values is not all empty.

Thank you.

Tahir Answered question May 16, 2024
0

Hi Marie, try this script:

|Matrix1::B|.items.each{
destinationCat->

if(|Matrix1|.getSelection(destinationCat, |Matrix1::A2|).value == null){

|Matrix1|.getSelection(destinationCat, |Matrix1::A2|).value = |Matrix1|.getSelection(destinationCat, |Matrix1::A1|).value

}

}

Tahir Answered question May 16, 2024
0

Hi Tahir,

Actually, i tried also this solution but it deletes the values from the original column and gets the same values from the other one.

I want a solution that keeps the ancient values and paste the values from the other column in the empty cells.

Marie Answered question May 15, 2024
0

Hi Marie, the easy way to copy values from A1 to A2 (even if A2 has some values) would be this script:

|Matrix1::A2|.values = |Matrix1::A1|.values

Tahir

Tahir Answered question May 15, 2024