Carrying the value of one item to another

Hi,
I am a beginner and i am trying to implement a rule where when the switch is activated, the value of a certain item gets carried to other item.

I implemented the following code

rule "Vacant mode_lab"
when
Item Vacant_lab received command
then
Lab_Tilt.sendCommand(SAT_north.state.toString)

What happens is when the switch is operated i.e., when Vacant_lab receives command ON, the rule works. However, values for SAT_north is being sent every second and those values are not updated in Lab_tilt. Please suggest a way to overcome this problem.

Thanks

I do not know how you pronounced Lab_Tilt, maybe you need to try it like this?
Lab_Tilt.postUpdate (SAT_north.state.toString)

I think you have to do it the other way around. If i understand it right SAT_north is sending every second a value and this value should be transfered to Lab_tilt if the switch Vacant_lab goes to on. Right?

rule "Vacant Mode"
when
    Sat_north received update  // this happens every second
then
    if (Vacant_lab.state == ON) then {
        Lab_Tilt.sendCommand(SAT_north.state.toString)
    }

So if the switch is on every update will be transfered. I am not sure if the syntax ist correct.

Thomas

The correct syntax was

rule "Vacant Mode"
when
    Item SAT_north received update
then
    if (Vacant_seminar.state == ON)
    {Lab_Tilt.sendCommand(SAT_north.state.toString)}
end

Thanks for your input!! It worked