Announcement

Collapse
No announcement yet.

Automatic Popluation

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

  • Automatic Popluation

    hi

    I was trying to populate certain fields based on the header information. When i tried prepopluating using 'sequence' field in the header variable, it works fine. Now i am trying the same with 'visitnumber' and 'pagenumber'. If i use just visitnumber it is working fine, but when i combine both visitnumber and pagenumber the automatic population isn't working. The only difference that i could find between the two variables is that visitnumber is a text character field and pagenumber is a combo box, could this be the problem! Both are character variables though.

    this code works fine
    if visitnumber.text = '2' then do;
    stype.text = 44;
    sampno.text = 1;
    end;

    but this one doesn't (400 is the pagenumber that i have given for page 40)
    if visitnumber.text ='2' and pagenumber.text = '400' then do;
    stype.text = 44;
    sampno.text = 1;
    end;

    thanks.
    Last edited by Ronni Rubenstein; 06-19-2008, 09:41 AM.

  • #2
    The only change you need for this is to change the .text to a .selectedItem for the pagenumber. When dealing with something like a combo box or radio box you need to use selectedItem because it's no longer a text field. Otherwise it should work fine.

    Comment


    • #3
      hey

      thanks so much for the help. Now my code works fine.

      thanks.

      Comment

      Working...
      X