The combination of this and correcting the Flag in my If statement did the trick. Thank you very much!
Derek Davis Systems Engineer | Information Systems Augusta Health | (540)332-5557 "Those who would give up essential liberty, to purchase a little temporary safety, deserve neither liberty nor safety." ~Ben Franklin From: [email protected] [mailto:[email protected]] Sent: Friday, June 28, 2013 8:13 AM To: [email protected] Cc: Brady, Sean Subject: RE: [talkbws] Question about capturing Meditech field on screen Change View(Row:=17, Col:=93, Length:=5) To Trim(View(Row:=17, Col:=93, Length:=5)) and this will work An alternate would be View(Row:=17, Col:=93, Length:=5,bTrim:=True) The View command always returns a string the same length as Length - empty spaces on a character based screen like Meditech are not "" they are " ". So your comparison really was doing If "" = " " Which of course never would be true. This behavior (spaces being a "thing" not nothing) is very good thing because you can do things like: ... If not at(" "@17,93") for example to detect if an area of a screen has some value but you don't necessarily care what the value is. ... Thom C. Blackwell, VP Technical Services Boston Software Systems, Inc. Phone: 866.653.5105 x807 Mobile: 508.423.8463 Fax: 508.319.3015 www.bostonsoftwaresystems.com<http://www.bostonsoftwaresystems.com/> Healthcare Automation - Revolutionizing How You Work. The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] Sent: Friday, June 28, 2013 8:03 AM To: Talk Cc: Brady, Sean Subject: FW: [talkbws] Question about capturing Meditech field on screen I sent this through a replied message yesterday, but I'm not sure it went through. If anyone has any suggestions, I would appreciate it. We were able to view the field, but are running into problems with the IF statement. We are bringing this field into a script, and if it's blank we need to populate it with ORST2. With the code below, it will populate the field with ORST2 regardless if it's blank or not. For example, I ended up with ORST3ORST2 instead of it doing nothing because it was originally populated with ORST3. Any help would be appreciated. F("Severity") = View(Row:=17, Col:=93, Length:=5) If Severity = "" Then Enter "ORST2" Thanks, Derek Davis Systems Engineer | Information Systems Augusta Health | (540)332-5557 From: Brady, Sean Sent: Tuesday, June 25, 2013 12:36 PM To: '[email protected]' Cc: Davis, Derek Subject: RE: [talkbws] Question about capturing Meditech field on screen Thank you so much! I will give that a try. I figured it was simple but could not wrap my brain around it at the moment. -- Sean Brady, BSMIS Interoperability Analyst, Information Systems | Augusta Health P.O. Box 1000 | 78 Medical Center Drive | Fishersville, VA 22939 (540) 332-5572 Office | (540) 332-5501 Fax | www.augustahealth.com<http://www.augustahealth.com/> [Aug_Hlth_1_Small]Click Here to Log a Help Desk Request<http://helpdesk/hsweb> From: [email protected]<mailto:[email protected]> [mailto:[email protected]] Sent: Tuesday, June 25, 2013 12:31 PM To: [email protected]<mailto:[email protected]> Subject: RE: [talkbws] Question about capturing Meditech field on screen Highlight the Meditech field in the Boston Workstation window and then click on the View button. If you have record at cursor on you will get something that looks like this: F("") = View(Row:=14, Col:=37, Length:=11) Change the F("") to whatever variable you want to call it If myvariable = "" then enter "texthere" ________________________________ From: [email protected]<mailto:[email protected]> [mailto:[email protected]] Sent: Tuesday, June 25, 2013 11:15 AM To: [email protected]<mailto:[email protected]> Cc: Davis, Derek Subject: [talkbws] Question about capturing Meditech field on screen All, We are currently trying to write a script in Meditech CS 5.65 and I am not familiar enough myself with full VB scripting to figure out how to capture information from a field in Meditech. I think I can do the if then statement part but what we are looking for is, If a field on screen is blank then enter "blah blah". How would you go about capturing the information that is currently in a field for the case statement? Thanks! -- Sean Brady, BSMIS Interoperability Analyst, Information Systems | Augusta Health P.O. Box 1000 | 78 Medical Center Drive | Fishersville, VA 22939 (540) 332-5572 Office | (540) 332-5501 Fax | www.augustahealth.com<http://www.augustahealth.com/> [Aug_Hlth_1_Small]Click Here to Log a Help Desk Request<http://helpdesk/hsweb> --- To post a message to this list, send mail to: [email protected]<mailto:[email protected]> You are currently subscribed as: [email protected]<mailto:[email protected]> Unsubscribe in the customer center on our website: http://www.bostonsoftwaresystems.com/Customers/ListServe.aspx --- To post a message to this list, send mail to: [email protected]<mailto:[email protected]> You are currently subscribed as: [email protected]<mailto:[email protected]> Unsubscribe in the customer center on our website: http://www.bostonsoftwaresystems.com/Customers/ListServe.aspx --- To post a message to this list, send mail to: [email protected]<mailto:[email protected]> You are currently subscribed as: [email protected]<mailto:[email protected]> Unsubscribe in the customer center on our website: http://www.bostonsoftwaresystems.com/Customers/ListServe.aspx --- To post a message to this list, send mail to: [email protected]<mailto:[email protected]> You are currently subscribed as: [email protected]<mailto:[email protected]> Unsubscribe in the customer center on our website: http://www.bostonsoftwaresystems.com/Customers/ListServe.aspx --- To post a message to this list, send mail to: [email protected] You are currently subscribed as: [email protected] Unsubscribe in the customer center on our website: http://www.bostonsoftwaresystems.com/Customers/ListServe.aspx
<<inline: image001.jpg>>
