Advertisement
Advertisement
| 05.15.2008 at 06:50AM PDT, ID: 23405073 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: |
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
'Set view = db.GetView("Process")
'Dim dc As NotesDocumentCollection
'Set dc = view.Getalldocumentsbykey("New")
'Call dc.StampAll("Status", "Output")
Dim uiws As New NotesUIWorkspace
Dim fileCSV As Variant
'Declare variables to hold data
Dim counter As Integer
Dim doc As NotesDocument
counter =0
'setup file number
filenum% = Freefile()
'Ask user for file location
fileCSV = uiws.OpenFileDialog(False, "Choose the CSV file","*.txt" ,"c:\pub")
'If the user chose a file then process
If Not Isempty(fileCSV ) Then
Open fileCSV(0) For Input As filenum%
Do Until Eof(filenum%)
'Read a line of data
Input #filenum%, REF_NUM ,CUSTOMER_REF , CARD_TYPE , STATUS , AUTH_NO , REGISTER_DATE , REGISTER_TIME , EXPIRY_DATE , GATEWAY , MERCHANT_CODE , TAG , AMOUNT , PLACEHOLDER, PLACEHOLDER2, CARD_NUM , TRANSACTION_NAME
'Check to see if there is still a header row
If STATUS= "STATUS" Then
Else
'Create Notes document and write values to it
Set doc = db.CreateDocument
With doc
.form = "Person"
.MERCHANT_CODE = MERCHANT_CODE
.GATEWAY = GATEWAY
OrderDate = Cdat(REGISTER_DATE+ " " +REGISTER_TIME)
Msgbox "You imported " & counter & " records."
.OrderDate = OrderDate
.TAG = TAG
.AUTH_NO = AUTH_NO
.STATUS = STATUS
.TRANSACTION_NAME = TRANSACTION_NAME
If Trim(TRANSACTION_NAME) = "Refund" Then
.AMOUNTDUE = 0 - Cstr(Strright ( AMOUNT, "$"))
Else
.AMOUNTDUE = Cstr(Strright ( AMOUNT, "$"))
End If
.CreditCardType = CARD_TYPE
.CreditCard = CARD_NUM
.ExpDate = EXPIRY_DATE
.CreditCardComments = REF_NUM
.Status = "New"
End With
'save document
Call doc.save(False, False)
'The next two lines of code call up the document again and force a refresh of all computed fields as well as any validations.
'Not quite how it is documented in help ...but it works.
Call doc.computewithform(True,False)
Call doc.save(True,False)
counter = counter +1
End If
Loop
Msgbox "You imported " & counter & " records."
|