Mike,
First of all welcome. And if any of the below is unclear please feel free to
contact Support - (866) 653-5105 ex1. They will be happy to help you!
You should be able to easily parse out just the detail record using a
combination of the DataStation and Rules. I am trying to be reasonably
descriptive so it probably sounds harder than it really is. Here goes.
Open your file using the Delimited option - from the sounds of it, you would
not check the first row has field labels option.
Your script will "move" through the file using 3 steps
Evaluate Status
Evaluate Record
Next Record
I am describing steps using this convention
Condition -> Action -> Goto
NA means no Action
Evaluate Status will allow you to determine if a record has been processed
before (if you need to stop/restart the script) and determines when you're at
the end of the file
Not EOF and D("Status")= ->NA -> Goto Evaluate Record
Not EOF and D("Status")<> ->NA -> Goto Next Record
EOF -> NA -> Goto Logout
Evaluate Record
The idea is in this step you will have 3 rules - each with Goto's, 2 going to a
step that gets another record, 1 that does the data entry
D("1")=Whatever your header id looks like - D("Status")="Skip" -> Goto Next
Record
D("1")=Whatever your trailer id looks like D("Status")="Skip" -> Goto Next
Record
Always -> NA -> Goto Enter Record 'you will D("Status") appropriately when you
successfully save the record, or if there was an error
The placement of the Always is critical - it must be the last one in the step
Next Record
Always -> D.Next_ -> Goto Evaluate Status
To Schedule a script to run twice a week, select View ->Scheduler- add your
script, set it's interval to be Daily, and uncheck the days of the week it
should not run, and set the time of day you want it to run.
Then and this is important. BWS MUST be running with that project open on the
PC and the PC needs to be in an interactive state - meaning you could sit in
front of the PC to do the job the script is doing. One approach (of many) is
to put a shortcut to the project file in the Startup folder of the PC.
Hope this helps!
Regards,
Thom
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]]
Sent: Thursday, February 27, 2014 3:26 PM
To: Talk
Subject: [talkbws] Newbie Question
I am new to script writing so here it goes.
We are a Magic site on 5.66. BWS version 9.8
I have to update a CDS in payroll from a .csv file. I will need to schedule
this to run by-weekly. The file I have to load contains a meaning less header
and trailer record. Each of these has a record identifier. The detail records
have no record type identifier in it. Is there an easy way to get a script to
ignore a header and trailer record? Plus how does one schedule a bi-weekly
script.
Thanks
Mike Klujeske
Project Analyst
MCHS Information Management - Finance
Phone: 507-238-8138 (Office)
Phone: 507-399-9015 (Cell)
E-mail: [email protected]<mailto:[email protected]>
__________________________________
Mayo Clinic Health System
800 Medical Center Drive
Fairmont, MN 56031
mayoclinichealthsystem.org<http://www.mayoclinichealthsystem.org/>
--- 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