Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

WEB @command filesave doesn't work

Posted on 2004-10-12
16
Medium Priority
?
414 Views
Last Modified: 2013-12-18
hi,

for all who might participated in the last question (web agent needed):
this question here referres to the same database.


i have a database which runs fine on my pc with domino.
there is 1 form with a button "save" doing:  @Command([FileSave]);
it works without any problem on my local pc.


problem:
i installed a new domino server 5.09 on an other pc.
on this server i copied the same database.
the acl is set for all to manager
i signed the databse with the new server's id
the server is added to the acl.
.
..... but
when pressing this button the form is not saved.
if i look in the view all documents no new document can be found there.

i think that this is a very simple function i use here.
i have no idea why it's not working.


any idea?





0
Comment
Question by:hreinart
16 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12285493
Add "Anonymous" and "Default" with a minimum of "Editor" level in the ACL.
0
 

Author Comment

by:hreinart
ID: 12285648
sorry, didn't mention this.
this is already done.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12286700
Do you have a SaveOptions field with its value set as "0"?
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:hreinart
ID: 12286968
i don't know this.

the only fileds used is 1 to enter a value
and a button like described.

i did not create a separate field for it.
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12287520
hreinart,
CHeck your log file, I feel surely it's related to access only. As Ranjeet has mentioned saveoptions is one of the field which u have to check for

Partha
0
 

Author Comment

by:hreinart
ID: 12295130
what exactly do i need to look for?

is this a property of the form?

or is this a field (i should know if i created this field manually, or?) ?
0
 

Expert Comment

by:orion17
ID: 12295799
SaveOptions is a field, it can be in the Form itself or can be directly be generated in the document by an agent. Are there any Error messages?
0
 

Author Comment

by:hreinart
ID: 12295900
hi,

this field doesn't exist.
no agnet saves the document

0
 

Author Comment

by:hreinart
ID: 12295930
hi,

the agent written by p_partha (last ee question) works fine in this database.
now i have the idea that this can be changed to save the document, too.

the from beeing used contains some fileds which are computed.
in the end a save (using an agent) needs to do the following:

1) look in the view NR, find the booknumber (specified in the field "buchnummer" of this form)
    and change the field status to "ausgeliehen".

2) save this form



this is the agent written by p_partha which works fine in this databse.
this agent returns a lent book.
it might be possible to use this with changes.


Dim db As NotesDatabase
      Dim view As NotesView
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim item As NotesItem
      Dim session As New notessession
      Dim dateTime As New NotesDateTime( "" )
      
      
      Set db = session.CurrentDatabase
      Set curdoc = session.documentcontext
      Set view = db.GetView ("($NX)" )
      Dim key As String
      Dim key2 As String
      key = curdoc.buchnummer(0)
      Set doc = view.GetDocumentByKey (key)
      If Not (doc Is Nothing) Then
            Call dateTime.SetNow
            Set doc.rueckgabe = dateTime
            Call doc.Save(True,True)
      End If
      Set db = session.CurrentDatabase
      Set view = db.GetView ("($NR)" )
      key2 = curdoc.buchnummer(0)
      Set doc = view.GetDocumentByKey (key2)
      If Not (doc Is Nothing) Then
            Set Item = doc.ReplaceItemValue("status","vorhanden")
            Call doc.Save(True,True)
      End If
0
 

Author Comment

by:hreinart
ID: 12296063
!!! please read carefully:

to save the document like i wrote before (using a notes client) a script already exists.
this script doesn't work for the web but could give you more information about
what is needed

ub Click(Source As Button)
      Dim session As New NotesSession
      Dim workspace As New NotesUIWorkspace
      Dim db As NotesDatabase
      Dim view As NotesView
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim item As NotesItem
      Set uidoc = workspace.CurrentDocument      
      
      Set db = session.CurrentDatabase
      Set view = db.GetView ("($NR)" )
      Dim key As String
      key = Cstr(uidoc.FieldGetText ("buchnummer"))
      Set doc = view.GetDocumentByKey (key)
      If Not (doc Is Nothing) Then
            Set Item = doc.ReplaceItemValue("status","ausgeliehen")
            Call doc.Save(True,True)
      End If
      Call uidoc.Close
End Sub
0
 
LVL 5

Accepted Solution

by:
steve_bagnall earned 400 total points
ID: 12432248
Haven't tested this, but it should work for you.  If you create an agent that runs once only using the script below.  Change the button formula to:

@command([ToolsRunMacro]; <agent_name>);
... + whatever else

This should perform the same function on the web as your current script does on a Notes client.


      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim view As NotesView
      Dim doc As NotesDocument
      Dim ContextDoc As notesdocument
      Dim item As NotesItem
      Dim key As String
      
      Set db = session.CurrentDatabase
      Set contextDoc = session.DocumentContext
      Set view = db.GetView ("($NR)" )
      
      
      Key = Cstr(ContextDoc.GetItemValue("buchnummer")(0))
      Set doc = view.GetDocumentByKey (key)
      If Not (doc Is Nothing) Then
            Set Item = doc.ReplaceItemValue("status","ausgeliehen")
            Call doc.Save(True,True)
      End If
      
0
 

Author Comment

by:hreinart
ID: 12435333
i'll try it out, thanks !!
0
 

Author Comment

by:hreinart
ID: 12583372
i can try it hopefully today (after local holiday)
0
 

Author Comment

by:hreinart
ID: 12838104
sorry, i was too lazy.

it took some time until i could test it, but about 1 week ago the test run very good.
sorry for beeing late here!

i increase the point (50)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
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…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

963 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