Page 1 sur 1

Get allowmultivalues Attributes for a field

MessagePublié: 09 Déc 2009 à 21:27
par Stephane Lachance
Hello. I need code (in LotusScript) the Isallowmultivalues function to return boolean value if the specified field of a form is a multivalue. I can only detect that with dxl but I need help to code it. Somebody can? Thank you

Bonjour. J'ai besoin de code (en LotusScript) pour cette fonction Isallowmultivalues qui retourne un booléen sur la présence de l'attribut multi-valeur sur un champ en particulier d'un masque donné. Je sais que je dois utiliser DXL mais j'ai aucune idée comment faire. Vous pouvez m'aider? Merci.

Code : Tout sélectionner
Function Isallowmultivalues(field As String, form as String, db As NotesDatabase) As Integer
     Isallowmultivalues = False
     '..........................................
End Function

Here the call script

MessagePublié: 09 Déc 2009 à 21:29
par Stephane Lachance
Code : Tout sélectionner
Function ListmultivaluesNameField(db As NotesDatabase) As String
   'List all field names datatype with allowmultivalues attributes
   ListmultivaluesNameField = ""
   Forall form In db.Forms
      Forall field In form.Fields
         Select Case form.GetFieldType(field)
         Case AUTHORS,NAMES,READERS :
            'Detect if field attributes allowmultivalues='true'
            If ISallowmultivalues(field,form.Name,db) Then
               ListmultivaluesNameField = ListmultivaluesNameField + form.Name + "/" + field +";+"
            End If
         End Select
      End Forall
   End Forall
End Function
[/code]

MessagePublié: 10 Déc 2009 à 09:03
par Michael DELIQUE
salut

je ne pense pas que ce soit possible comme ça, pour obtenir les attributs d'un champ il faut passer par L'objet NotesItem.

Sample of form's field report

MessagePublié: 10 Déc 2009 à 14:26
par Stephane Lachance

MessagePublié: 10 Déc 2009 à 14:44
par Michael DELIQUE
désolé j'avais tilté sur le DXL