Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Getting %s: %s when extracting data

Posted on 2002-05-28
13
Medium Priority
?
217 Views
Last Modified: 2013-12-18
Hi,

I am running LotusScript code that extracts data from a document and puts in Excel. Problem is it fails when it tries to extract the field names and it pops up with a window with this error: "%s: %s" What does this mean?

Here's a snippet of code below. If I a step through the code, the error pops up at the line where it says, "If x = -1 Then". There's at least 234 fields(items) it is trying to extract..would the no of fields be the problem? Most of the fields have no data.  Thanks.

'Get Field Names that will become column headings
x = -1
Forall i In ndocData.Items
If Left(i.Name, 4) = "xml_" Then
x = x + 1
Redim Preserve itemNames(x)
itemNames(x) = i.Name
End If
End Forall

If x = -1 Then
Msgbox "No data fields found!"
Exit Sub
End If

0
Comment
Question by:Mero
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +2
13 Comments
 
LVL 5

Expert Comment

by:snocross
ID: 7039304
When you are stepping through the code and you receive the error, what is the current value of x?
0
 
LVL 10

Accepted Solution

by:
zvonko earned 450 total points
ID: 7039342
Rewrite your checking statement from:
If x = -1 Then
to:
If (x < 0) Then

Also insert for debugging purposes after "xml_" string checking line a found trace, like:
MsgBox "Field: " & i.Name

It is also a good practice to have the setting:
Option Declare
set :-)

Are you programming in Notes.Designer or in Excel VBA?

0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7039433
Listening....
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Mero
ID: 7040494
I'm sorry I have not had a chance to answer your questions or try your suggestions.  I'll try to tommorrow.
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7041754
If there are 234 fields to go through, I'd suggest using print "Field: " & i.Name in stead of the message box, unless of course you want to click away a message box 234 times :-)

The debugging info will be available in notes log and in the status bar of the client running the agent.

Regards,
JM
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7041755
P.S.: Personally I prefer to write debugging info to an agent log, if you don't know how and want me to tell you, just let me know...
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7099449
Hello Mero,

any progress here?

0
 
LVL 10

Expert Comment

by:zvonko
ID: 7116881
Hello Mero...
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7117668
Hello Helloo..... !
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7121155
Earth to Mero, come in please :-)
0
 
LVL 10

Expert Comment

by:zvonko
ID: 7121186
"Mission Control, we have a problem" :)

0
 

Author Comment

by:Mero
ID: 7127738
All,

Have not had a chance to even touch this problem..Zvonko and Arunkumar, I am struggling with the CORBA problem I posted..
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7131880
Ah, okay :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question