OK, Thanks again.
Here is what I did based on your previous email. Please advice if this is
correct .
Both are in the same Script Module as seperate Subs.
thanks again for your assistance.
This determines the Count.
------------------------------------------------------------
Sub GetInventoryUnitCount(ByVal sStartingRow As String)
'Given a starting row the script will walk thru each row until the end
and returns a count of those rows.
'This function is used where there are multiple inventories for a
given BBK Unit.
'We need to get the number of entries and download the report for each
Inventory Unit.
'
Dim RowCount As Integer
Dim Y As Integer
Dim bHasValue As Boolean
RowCount = 0
MsgBox sStartingRow
For Y = sStartingRow To 10000
bHasValue = View(Row:=Y, Col:=1, Length:=5)
If bHasValue Then
RowCount = RowCount + 1
Else
Exit For
End If
Next Y
GetInventoryUnitCount = RowCount
End Sub
------------------------------------------------------------------------------
This does the Screen entries in a loop.
Sub DownLoadReportsForThisUnitList(ByVal count As Integer)
For i = 0 To count - 1
If Rule("Print b...@1,1&@4,10") Then
Enter D("1") '1717260
End If
If Rule("Print on:@1,1&@3,1") Then
Enter "DOWNLOAD"
End If
If Rule("choi...@1,1&@3,57") Then
Enter ""
End If
If Rule("Save a...@1,1&@43,35") Then
Enter F("DownLoadPath") & "\" & D("1") & "_" & i & ".txt"
End If
If Rule("mess...@1,1&@14,12") Then
Enter ""
End If
Next
End Sub
-----------------------------------------------------------------------------------------------
Ranjit M Bendapudi
Meditech Service Center
CSC
5209 Linbar Dr., Nashville, TN 37211
P: +1-615.662-7775 |direct: +1- 615.493.9070 |[email protected] |
www.csc.com
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
[email protected]
08/06/2009 02:27 PM
Please respond to
[email protected]
To
[email protected]
cc
Subject
[talkbws] RE: Looping Steps
I am not sure if you are using a module or class modules, but this is what
I would try first…
Public Sub intLoopCount as Integer
Public Sub DetermineLoopCnt()
Dim intResult
‘You would enter your code here to determine the number of loops needed
here and assign it to a variable.
intResult = What your code determines.
intLoopCount = intResult
End Sub
Public Sub DoScreenActions(ByVal LoopCount as Integer)
Dim J as Integer
J = 0
For J = 0 to LoopCount
‘Enter your code for going through the screens here
Next
End Sub
So in the actions of your rule within the step I would call
DetermineLoopCnt first and then would go to the next line and run
DoScreenActions(intLoopCount) right after.
Garrett
From: [email protected] [mailto:[email protected]]
Sent: Thursday, August 06, 2009 12:13 PM
To: [email protected]
Subject: [talkbws] RE: Looping Steps
Thanks for the reply.
Yes, I do have a sub routine. Right now the sub routine determines the
number of times to loop. Once I have that value(say 5), I have to do a set
of actions(entering data into Meditech screen) 5 times. I am entering say,
the same screens 5 times. So I created a Step to do this one time and I
want to repeat the same 5 times.
When you meant 'actions' can I put all the Rules in my Sub Routine? can
you pls be a little specific??
thank you
Ranjit M Bendapudi
Meditech Service Center
CSC
5209 Linbar Dr., Nashville, TN 37211
P: +1-615.662-7775 |direct: +1- 615.493.9070 |[email protected] |
www.csc.com
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
[email protected]
08/06/2009 01:57 PM
Please respond to
[email protected]
To
[email protected]
cc
Subject
[talkbws] RE: Looping Steps
What about creating a Sub Procedure? There you can surround your actions
with either a For...Next Loop or a Do...Until Loop and then all you have
to do is call your procedure in the step that you need it in.
Garrett S. O'Sullivan
Project Assistant
Regional Business Office
1235 NE 47th Avenue, Suite 110
Portland, Oregon 97213
Phone: 503.215.4462
Fax: 503.215.4343
Pager: 503.920.4560
[email protected]
From: [email protected] [mailto:[email protected]]
Sent: Thursday, August 06, 2009 11:55 AM
To: [email protected]
Subject: [talkbws] Looping Steps
Hello all,
Is there a way Loop a step?
I am trying to do a set of actions in a Step. And this step has to be done
'n' times before it goes to next setp or record.
For i=0 to 5
Step="Key Resources"
next i
thanks in advance.
Ranjit M Bendapudi
Meditech Service Center
CSC
5209 Linbar Dr., Nashville, TN 37211
P: +1-615.662-7775 |direct: +1- 615.493.9070 |[email protected] |
www.csc.com
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose. --- 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.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx
DISCLAIMER:
This message is intended for the sole use of the addressee, and may
contain information that is privileged, confidential and exempt from
disclosure under applicable law. If you are not the addressee you are
hereby notified that you may not use, copy, disclose, or distribute to
anyone the message or any information contained in the message. If you
have received this message in error, please immediately advise the sender
by reply email and delete this message.
---
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.bostonworkstation.com/customer_center/virtual_user_group_talk.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.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx
DISCLAIMER:
This message is intended for the sole use of the addressee, and may
contain information that is privileged, confidential and exempt from
disclosure under applicable law. If you are not the addressee you are
hereby notified that you may not use, copy, disclose, or distribute to
anyone the message or any information contained in the message. If you
have received this message in error, please immediately advise the sender
by reply email and delete this message. ---
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.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx