sharepoint online – Complicated If statement column format

Try the following:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "=if(Number(($SignOutTime))!=0 && Number(($ExitTime))!=0, 'Out', if(Number(($SignOutTime))!=0 && Number(($SignInTime))==0,'Out',if(Number(($ArrivalTime))==0, 'Out', 'In')))",
  "attributes": {
    "class": "=if(Number(($SignOutTime))!=0 && Number(($ExitTime))!=0,'sp-field-severity--severeWarning',if(Number(($SignOutTime))!=0 && Number(($SignInTime))==0,'sp-field-severity--severeWarning',if(Number(($ArrivalTime))==0, 'sp-field-severity--severeWarning', 'sp-field-severity--good')))"
  }
}

enter image description here

Getting all file sizes on a SharePoint 2013 server

How do I get all the files in my SharePoint 2013 server? It will list the document libraries but the .csv will have no information printed on it.

I am able to run this fine on SharePointOnline and it will print the information in the .csv file.

Thanks for any assistance!

#Config Variables
$SiteURL = "https://sharepoint.com/"
$CSVFilePath="C:UsersuserDesktopfile.csv"

Import-Module SharePointPnPPowerShellOnline
Connect-PnpOnline -Url $SiteURL -Credential $cred

 
 
#Get all document libraries
$FileData = @()
$DocumentLibraries = Get-PnPList | Where-Object {$_.BaseType -eq "DocumentLibrary" -and $_.Hidden -eq $False}
 
#Iterate through document libraries
ForEach ($List in $DocumentLibraries)
{
    Write-host "Processing Library:"$List.Title -f Yellow
     
    #Get All Files of the library with size > 100MB
    #$Files = Get-PnPListItem -List $List -PageSize 500 | Where {($_.FieldValues.FileLeafRef -like "*.*") -and ($_.FieldValues.SMTotalFileStreamSize/1MB -gt 100)}
    if($Files.BaseType -eq "DocumentLibrary")  
    {
        #Collect data from each files
        ForEach ($File in $Files)
        {
            $FileData += (PSCustomObject)(ordered)@{
                Library         = $List.Title
                FileName        = $File.FieldValues.FileLeafRef
                URL              = $File.FieldValues.FileRef
                Size            = (math)::Round(($File.FieldValues.SMTotalFileStreamSize/1MB),2)
            }
        }
    }
}
#Export Files data to CSV File
$FileData | Sort-object Size -Descending
$FileData | Export-Csv -Path $CSVFilePath -NoTypeInformation


#Read more: https://www.sharepointdiary.com/2018/11/sharepoint-online-find-all-large-files-using-powershell.html#ixzz6Yy8ueFyy

How to make Sharepoint calendar reflect individual user timezone?

Our timezone by default is Pacific but we have users in Central time and their Sharepoint calendars aren’t reflecting their timezone entered on the calendar. I did a test calendar event where I put 3pm-4pm I would’ve imagined on their end it would be viewed as 4-5pm? That isn’t the case though. I just want to make sure that if I set something on the calendar with an alert they they will get it based on their timezone. As you can see below, I changed the individual who is in Central time to their correct time zone so it isn’t using our region default.

enter image description here

powerapp – How do I assign SharePoint and Power Apps licenses to the guest users?

We are trying to invite guest users so that they can use our Power Apps connected to SharePoint. The problem is that I don’t understand how to assign a license to guest users. I have read that it’s possible, but when we actually try to do it, there is no options anywhere to do it. Does anyone know how it is supposed to work?

enter image description here

enter image description here

I will be really grateful for any suggestions!

Lookup image conditionally in SharePoint list formatting

I have a column named LinkType that will tell if the item is a Bug, Requirement, Feature, etc and based on the value I would like to display different pictures. Previously I was using a similar setup with the iconName attribute, but for some reason it does not seem to work the same way with displaying images conditionally. What is wrong?

  "elmType": "img",
  "style": {
      "width": "100px"
  },
  "attributes": {
      "src": "=if(($LinkType) == 'Requirement', '/sites/aaa/publishingimages/requirement.gif', if(($LinkType) == 'Feature', '/sites/aaa/publishingimages/feature.gif', if(($LinkType) == 'Task', '/sites/aaa/publishingimages/task.gif', if(($LinkType) == 'Query', '/sites/aaa/publishingimages/query.gif', if(($LinkType) == 'Bug', '/sites/aaa/publishingimages/bug.gif', 'ErrorBadge'))))"
  }
   

javascript – Sharepoint list last modified date

I use this code to get the date of the last edit of a certain list.
Now I want to loop through the listitems and identify the item that was changed last, so i.e. that has the same date as the lastItemModifiedDate()

How you I do this?

Anyone?

ExecuteOrDelayUntilScriptLoaded(Initializeall, 'sp.js');
 function Initializeall()
{

 var ctx = SP.ClientContext.get_current();
 var web = ctx.get_web();
 var lists = web.get_lists();
 var list = lists.getByTitle("Sample");
ctx.load(list, "LastItemModifiedDate");
ctx.executeQueryAsync(
function() {
    var lastmodified = list.get_lastItemModifiedDate();
alert(lastmodified);
},
function() {}
);
}
</script>

modern experience – Display Planner, on a SharePoint site, to regular SharePoint site members that are not members in Office 365 Group

In our tenant, group-connected SharePoint sites are disabled. If we want to use group-connected tools in our SharePoint sites, we need to create a Team from the beginning. Then we need to activate a lot of features to be able to use that Team as a SharePoint site.

But since we are a large company we are using AD groups to control permissions to SharePoint sites and other assets.
When people join the company or department they get listed in an AD group and automatically they are granted access to the information they need. When they leave the department, they get removed from the AD group.

For Teams, Microsoft is recommending using Office 365 Groups instead of regular AD groups… The way I have understood this, is that it is possible to add an AD group to an Office 365 Groups, but any changes done to the AD groups afterwards are not reflected in the Office 365 Group.
So the result with Office 365 Groups will be that new employees will not automatically get access to the correct information and people leaving the department will continue to have access to information they should not have.

Since we are not able to handle that extra administration, it feels better to just stick to the old AD groups. But it seems like membership to an Office 365 Groups is required to be able to use group-connected tools.

In our situation, for instance for a project site, we usually have a lot of readers and also a lot of members. But usually these people are not project members, instead they are stakeholders in other ways.
Today, on a classic project site we are using the project summary webpart to display a timeline. In a SharePoint Online modern site maybe the group-connected tool Planner could be a replacement for the timeline?

But what is really required in terms of permissions to be able to display Planner information on a SharePoint project site? Can we have just the project manager and perhaps just some few more persons managing the Planner in an Office 365 Group and display the Planner webpart on the project site and have it viewable by readers and members managed in regular SharePoint groups?
Or will the stakeholders not see any Planner since they are not in an Office 365 Group?

I am confused, but maybe this setup is not a problem at all? Please shed some light!

sharepoint online – Add-PnPHubSiteAssociation : “Value cannot be null”

I am trying to link associate sites to one of hubsite but i end with strange error saying Add-PnPHubSiteAssociation : “Value cannot be null”.

$Sites = Import-Csv -Path "C:UsersusernameDocumentsBook1.csv"
$myHubsite = "https://tenant.sharepoint.com/sites/TestSite"
foreach ($site in $Sites) {
  error->  Add-PnPHubSiteAssociation -Site $site.SiteUrl -HubSite $myHubsite
}

I tried with single site still same error

Add-PnPHubSiteAssociation -Site https://tenant.sharepoint.com/sites/TestSite1 -HubSite https://tenant.sharepoint.com/sites/TestSite

Error message:

Add-PnPHubSiteAssociation : Value cannot be null.
Parameter name: value
At line:4 char:5
+     Add-PnPHubSiteAssociation -Site $site.SiteUrl -HubSite $myHubsite
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) (Add-PnPHubSiteAssociation), ArgumentNullException
    + FullyQualifiedErrorId : System.ArgumentNullException,PnP.PowerShell.Commands.Admin.AddHubSiteAssociation