PdcSharepoint.SearchFileWithExactName: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == SearchFileWithExactName(strFileName As String) As SharepointFileInfo == Description == Upload a file into Sharepoint, it will be placed in the directory..."
 
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
== Description ==
== Description ==
Upload a file into Sharepoint, it will be placed in the directory targetted by the name passed to the constructor ([[pdcApplication.Sharepoint]])<br>
Upload a file into Sharepoint, it will be placed in the directory targetted by the name passed to the constructor ([[pdcApplication.Sharepoint]])<br>
If successful, the result will contain the [[SharepointFileInfo]] for the file in Sharepoint, by which it can be targetted later<br>
If successful, the result will contain the file details. <br>
If unsuccessful, the result will be nothing and [[PdcApplication.LastError]] will contain an error message
If unsuccessful, the result will be nothing and [[PdcApplication.LastError]] will contain an error message


Line 11: Line 11:
<source lang="vb">
<source lang="vb">
Dim sp As PDCEXT.PdcSharepoint = PDC.App.Sharepoint("scriptUploadLocation")
Dim sp As PDCEXT.PdcSharepoint = PDC.App.Sharepoint("scriptUploadLocation")
Dim resultId As String = sp.UploadFile("C:\files\test.txt")
Dim spFileInfo As PDCEXT.SharepointFileInfo = sp.SearchFileWithExactName("test.txt")
</source>
</source>


== Availability ==
== Availability ==
Available since 2021R4
Available since 2021R4

Latest revision as of 14:43, 28 January 2022

Declaration

SearchFileWithExactName(strFileName As String) As SharepointFileInfo

Description

Upload a file into Sharepoint, it will be placed in the directory targetted by the name passed to the constructor (pdcApplication.Sharepoint)
If successful, the result will contain the file details.
If unsuccessful, the result will be nothing and PdcApplication.LastError will contain an error message

Code example

Dim sp As PDCEXT.PdcSharepoint = PDC.App.Sharepoint("scriptUploadLocation")
Dim spFileInfo As PDCEXT.SharepointFileInfo = sp.SearchFileWithExactName("test.txt")

Availability

Available since 2021R4