Hi,
I am using office 365 activity to create folder in one drive, the folder variable is saved as DriveItem, Now during next bot run I want to check whether that folder name already exist or not, if not exist bot have to create new folder. Now my problem is I am unable to extract the file name from DriveItem. Can some one provide me the exact syntax to extract the folder name as string so I can use IF condition to check whether the folder exist or not.
I want to extract Name=“office365test”. I tried to use split string and it didnt work.
Or any other method to check whether the folder in one drive already exist or not.
Below is the value from the folder variable.
DriveItem[1]
{
DriveItem
{
AdditionalData=null,
Analytics=null,
Audio=null,
Children=null,
Content=null,
CreatedBy=null,
CreatedByUser=null,
CreatedDateTime=[07/24/2019 06:28:01 +00:00],
CTag=null,
Deleted=null,
Description=null,
ETag=null,
File=null,
FileSystemInfo=FileSystemInfo
{
AdditionalData=null,
CreatedDateTime=[07/24/2019 06:28:01 +00:00],
LastAccessedDateTime=null,
LastModifiedDateTime=[07/24/2019 06:28:01 +00:00],
ODataType=null
},
Folder=Folder
{
AdditionalData=null,
ChildCount=0,
ODataType=null,
View=null
},
Id=“01O5GMBBOF5BTWE2AELJALHGMKITIKJAJX”,
Image=null,
LastModifiedBy=null,
LastModifiedByUser=null,
LastModifiedDateTime=[07/24/2019 06:28:01 +00:00],
ListItem=null,
Location=null,
Name=“office365test”,
ODataType=“#microsoft.graph.driveItem”,
Package=null,
ParentReference=ItemReference
{
AdditionalData=null,
DriveId=“b!VLhl78qaoUyeBE-Wbh7yn-IpR6_Hyq1HivB_NQRu_e0OYoqVF5HXTIlewDj4QVxD”,
DriveType=“business”,
Id=“01O5GMBBP5EV7CVWMVSNCYMYDKTSGQOTOM”,
Name=null,
ODataType=null,
Path=null,
ShareId=null,
SharepointIds=null,
SiteId=null
},
Permissions=null,
Photo=null,
Publication=null,
RemoteItem=null,
Root=null,
SearchResult=SearchResult
{
AdditionalData=null,
ODataType=null,
OnClickTelemetryUrl=null
},
Shared=Shared
{
AdditionalData=null,
ODataType=null,
Owner=null,
Scope=“users”,
SharedBy=null,
SharedDateTime=null
},
SharepointIds=null,
Size=0,
SpecialFolder=null,
Subscriptions=null,
Thumbnails=null,
Versions=null,
Video=null,
WebDavUrl=null,
WebUrl=“Sign in to your account”,
Workbook=null
}
}