Use formula to show names of all fields

Good day…

Can i place in particular field, all fieldnames of other form?

If in a field in selection formula insert @DbColumn, when it shows me all values of one field.

Is there any way i can use formula to show names of all fields?

Same way as it realised in search - when you press button “Field” and add search conditions, in the field “Field” listed all fieldnames. Is there any way i can do this?

Best regards, Evgeniy

Subject: Use formula to show names of all fields

Can i place in particular field, all fieldnames of other form?

I suppose You mean fields from document not a form.

If so You can do it by LS code:

Dim doc As NotesDocument
'…set value of doc…
Forall i In doc.Items
Messagebox( i.Name )
End Forall

If You mean form object:

stringArray = notesForm.Fields

Konrad

Subject: Use formula to show names of all fields

Hi Evgeniy,

here is the sample code…

Dim session As New NotesSession

Dim db As NotesDatabase

Set db = session.CurrentDatabase

formNameIn = Lcase(Inputbox(“Name of form?”))

Forall form In db.Forms

If Lcase(form.Name) = formNameIn Then

If Isempty(form.Fields) Then

  Messagebox form.Name & " has no fields"

Else

  fieldCount = 0

  msgString = ""

  Forall field In form.Fields

    fieldCount = fieldCount + 1

    msgString = msgString & Chr(10) & _

    "     " & field

  End Forall

  Messagebox form.Name & " has " & _

  fieldCount & _

  " field(s):" & Chr(10) & msgString

End If

Exit Sub

End If

End Forall

Messagebox “The form “”” & formNameIn & “”" does not exist"

hope this helps :slight_smile:

cheers

RAJ

Subject: Use formula to show names of all fields

Thank you for your help, but how can i put these values in the field of other form?