Announcement

Collapse
No announcement yet.

Setting field values and protecting them in sequenced screens

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting field values and protecting them in sequenced screens

    Hi Greg,
    Thanks for your help. That works perfectly.
    Best regards, Thomas.


    -----Original Message-----
    From: Greg Wagner [mailto:[email protected]]
    Sent: 21 January 2009 13:15
    To: Thomas Kumke; Support
    Subject: Re: [#SRX04176] Setting field values and protecting them in sequenced screens

    Hi Thomas,

    Try using the variable method .lock() within your code as follows...

    if sequence.text > 1 and sequence.text ne 5 then do;
    dtecg.text=.;
    dtecg.lock();
    end;


    This should lock the field as you need. The one catch is that a user can still insert a sequence within the group of records allowing more sequences then you want. I have a post on the forum which addresses this if you want to try and code to disallow that.

    http://forums.clinplus.com/showthrea...light=sequence

    Regards,
    Greg-


    -----Original Message-----
    From: Thomas Kumke [mailto:[email protected]]
    Sent: Tuesday, January 20, 2009 9:33 AM
    To: Support
    Subject: Setting field values and protecting them in sequenced screens

    Hi,
    I actually wanted to post this into the forum, but apparently I do not have sufficient privileges for posting threads. So, here is my question:

    I am trying to set field values and to protect them in certain sequences and in others not. A typical example is an ECG dataset with say 6 time points:
    1=Pre-dose; 2= 1h; 3=4 h; 4=8 h; 5=16 h and 6=24 h.
    Each time point is a separate sequence with the variables time point, opinion, dtecg, tmecg, and all common ECG variables.
    The date of ECG (dtecg) is the same up to sequence 4 and changes to the next day at sequence 5. We would usually enter dtecg for sequence 1, leave it blank for sequences 2, 3 and 4, enter the new date in sequence 5 and leave it blank in sequence 6.
    While I get the onLoad SCL code working for leaving the sequences blank, eg:

    if sequence.text > 1 and sequence.text ne 5 then do;
    dtecg.text=.;
    end;

    I am having difficulties to protect the fields. It looks like that the command:
    protect dtecg
    does not work.
    I also tried to conditionally jump over dtecg, ie:

    if sequence.text > 1 and sequence.text ne 5 then tmecg._goto();

    But it just causes to jump over timing as well.

    Do you have any ideas to get this working?
    Thank you for your help.
    Best regards, Thomas.

    Dr.rer.nat.habil. Thomas Kumke
    Head of Statistics and Data Management Department Hammersmith Medicines Research Central Middlesex Hospital Acton Lane London NW10 7NS UK
    web: http://www.hmrlondon.com
    Last edited by Ronni Rubenstein; 12-21-2009, 11:17 AM.
Working...
X