Page 1 of 1

using cellput to put the same value in 2 element values

Posted: Tue Apr 30, 2024 3:01 pm
by M1ndbender
I have a cell put on the data tab of a process. What i need is the Rate Value to be put against 2 elements.

Where it says if SourceNum @= 1 I want to put that Rate into values of 1 and 3 in the Price Rate dimension

Everything I have tried has not worked and google has been no help. Is this possible?

Code: Select all

IF (vSourceNum @= '1');
    CellPutN( Value,
        vTargetCube,
        Period, 
        vcompany ,
        '1',  AND 3
        product,
        'Rate');
ELSEIF (vSourceNUM @= '2');
    CellPutN( Value,
        vTargetCube,
        Period, 
        vcompany ,
        '2', 
        product,
        'Rate');
ENDIF;

Re: using cellput to put the same value in 2 element values

Posted: Tue Apr 30, 2024 3:15 pm
by MarenC
Hi,

Why not have 2 cellputs within the

Code: Select all

IF (vSourceNum @= '1')
section;? One for Price Rate 1 and one for Price Rate 3?

Maren

Re: using cellput to put the same value in 2 element values

Posted: Tue Apr 30, 2024 3:15 pm
by Adam
Try repeating CellPutN function, once with ‘1’ AND once with ‘3’.

Re: using cellput to put the same value in 2 element values

Posted: Tue Apr 30, 2024 3:19 pm
by M1ndbender
Thank you. I did not try putting 2 cellputs under the if. I had tried a second if with the same criteria that did not work.

This appears to be working now
Thank you for the help