OVH Cloud OVH Cloud

ajouter une REQUETE dans un webpart

1 réponse
Avatar
math
Bonsoir tout le monde
j'ai cr=E9=E9 un profil avec un champ "visible" en liste=20
d=E9roulante (actif,inactif) afin de pouvoir faire une=20
requete sur ce champ et afficher tous les =E9l=E9ments qui=20
sont actifs. Voici une partie du code:

hq.StartSearchQuery "SELECT " & vbCRLF & _
" ""DAV:href"", " & vbCRLF & _
" ""DAV:displayname"", " & vbCRLF & _
" ""DAV:getlastmodified"", " & vbCRLF & _
" ""urn:schemas-microsoft-
com:office:office#Description"", " & vbCRLF & _
" ""urn:schemas-microsoft-
com:publishing:ShortcutTarget"", " & vbCRLF & _
" ""urn:schemas-microsoft-
com:office:office#visible"", " & vbCRLF & _
" ""urn:schemas-microsoft-
com:office:office#Title"" " & vbCRLF & _
"FROM " & vbCRLF & _=20
"WHERE CONTAINS (ALL, 'actif') " & vbCRLF & _=20
" SCOPE('SHALLOW TRAVERSAL OF ""/" &=20
GetWorkspaceName() & strFolderPath & """')" & vbCRLF & _
strOrderByFragment, 0, cRecordsToDisplay - 1, -
1, True


Mais voil=E0, je ne connais pas ce sql, et je souhaite faire=20
un WHERE urn:schemas-microsoft-com:office:office#visible=20
=3D"actif", et =E7a ne marche pas.
Dans le code, j'ai essay=E9 le WHERE CONTAINS, mais =E7a ne=20
marche pas non plus.
Y a t'il une solution =E0 mon probl=E8me?
merci par avance

ps:quelle est la formation =E0 suivre pour sharepoint (en=20
d=E9veloppement)?

1 réponse

Avatar
math
Merci bcp pour votre aide.
je test de suite

-----Message d'origine-----
Bonjour,

A priori, vous suivez mon idée ;)

Pour la requete, il y avait juste une petite coquille

le where doit etre entre le from scope et l'order avec la
typo suivante:
WHERE "urn:schemas-microsoft-com:office:office#visible"
= 'actif'

si vous concatenez, doublez bien les "
& "WHERE ""urn:schemas-microsoft-
com:office:office#visible"" = 'actif'"

En ce qui concerne la formation, ca ne reste que de


l'asp,
du cdo exchange et BEAUCOUP de patience (SDK,
newsgroup,...)et de test.

Par contre, la V2 repose entierement sur .NET. Tres peu


du
modéle de V1 a été gardé

voila

Renaud COMTE
www.clubSPS.org

-----Message d'origine-----
Bonsoir tout le monde
j'ai créé un profil avec un champ "visible" en liste
déroulante (actif,inactif) afin de pouvoir faire une
requete sur ce champ et afficher tous les éléments qui
sont actifs. Voici une partie du code:

hq.StartSearchQuery "SELECT " & vbCRLF & _
" ""DAV:href"", " & vbCRLF & _
" ""DAV:displayname"", " & vbCRLF & _
" ""DAV:getlastmodified"", " & vbCRLF & _
" ""urn:schemas-microsoft-
com:office:office#Description"", " & vbCRLF & _
" ""urn:schemas-microsoft-
com:publishing:ShortcutTarget"", " & vbCRLF & _
" ""urn:schemas-microsoft-
com:office:office#visible"", " & vbCRLF & _
" ""urn:schemas-microsoft-
com:office:office#Title"" " & vbCRLF & _
"FROM " & vbCRLF & _
"WHERE CONTAINS (ALL, 'actif') " & vbCRLF &




_
" SCOPE('SHALLOW TRAVERSAL OF ""/" &
GetWorkspaceName() & strFolderPath & """')" & vbCRLF & _
strOrderByFragment, 0, cRecordsToDisplay -


1, -
1, True


Mais voilà, je ne connais pas ce sql, et je souhaite


faire
un WHERE urn:schemas-microsoft-com:office:office#visible
="actif", et ça ne marche pas.
Dans le code, j'ai essayé le WHERE CONTAINS, mais ça ne
marche pas non plus.
Y a t'il une solution à mon problème?
merci par avance

ps:quelle est la formation à suivre pour sharepoint (en
développement)?
.



.