Autor Thema: how can I use a field on the WEB from a $$ViewTemplate form ?  (Gelesen 959 mal)

Offline Toma Bogdan

  • Aktives Mitglied
  • ***
  • Beiträge: 146
  • Geschlecht: Männlich
  • That's me ...
    • A nice site !
I have a form with a embedded view and the first column on the view contains the UNID of the docs:

"[<INPUT TYPE=radio NAME=\"CheckBox\" VALUE=\"" + @Text(@DocumentUniqueID) + "\">]"

Also in the form I have a button - Press this - with @Command([ToolsRunMacro]; "test") command.

The agent test is:
Code
Sub Initialize
   Dim session As New notessession
   Dim db As notesdatabase
   Dim doc As notesdocument
   Dim item As notesitem
   Set db = session.currentdatabase
   Set doc = session.documentcontext
   Set item = doc.GetFirstItem( "CheckBox")
   If item.text<>"" Then
      Forall v In item.Values
         Set doc = db.getdocumentbyunid(Cstr(v))
         vHTML = vHTML +  "</TD><TD>" + {</TD><TD><FONT COLOR="red"> ok </FONT><BR>}
         Print vHTML
      End Forall
    End if
End Sub

I need to get the ID of the current doc from the view with a radio button. When I try  to use it in this way the agent works fine but when I try to use the same code into a $$ViewTemplate for view1 I can't get the UNID ! It seems that it doesn't see the CheckBox field.

Eg. For the ($All) view from the Mail DB (I added the extra column with the UNID value). It has a form template $$ViewTemplate for ($All) in which I added my button Press this and I can't get the CheckBox value.

How can get this value in this situation (using a $$ViewTemplate  form) ? 10x

Offline harkpabst_meliantrop

  • Senior Mitglied
  • ****
  • Beiträge: 463
  • Geschlecht: Männlich
  • I love!
    • Heute schon gelebt?
Re:how can I use a field on the WEB from a $$ViewTemplate form ?
« Antwort #1 am: 06.06.03 - 19:48:49 »
Honestly speaking, I didn't look at your problem too closely, but if you're trying to access multple docs form a view, you should definitely have a look at Jake's January article and save yourself a lot of time:

http://www.codestore.info/store.nsf/unid/EPSD-5GMT3B?openDocument

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz